Skip to content

Instantly share code, notes, and snippets.

@rcy
Created May 10, 2021 19:03
Show Gist options
  • Save rcy/e5407ddaf82236be9db5ef928ae48955 to your computer and use it in GitHub Desktop.
Save rcy/e5407ddaf82236be9db5ef928ae48955 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: 'fetch',
initial: 'start',
context: {
retries: 0
},
states: {
start: {
on: {
SKIP: 'skipped',
COMPLETE: 'completed'
}
},
skipped: {
on: {
COMPLETE: 'completed'
}
},
completed: {
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment