Skip to content

Instantly share code, notes, and snippets.

@tmikeschu
Created June 11, 2020 17:13
Show Gist options
  • Save tmikeschu/058ee178955d66a8c8dac9d997f0a815 to your computer and use it in GitHub Desktop.
Save tmikeschu/058ee178955d66a8c8dac9d997f0a815 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: 'ideadate',
initial: 'welcome',
context: {
retries: 0
},
states: {
welcome: {
on: {
MATCH: 'match',
SELECT: 'select'
}
},
match: {
on: {
GET_MATCHED: 'matching'
}
},
matching: {
after: {
1000: 'matched'
}
},
select: {
on: {
SELECT_PERSON: 'matched'
}
},
matched: {}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment