Skip to content

Instantly share code, notes, and snippets.

@rianfowler
Last active March 14, 2023 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rianfowler/52fc07e4b1cddb9ca7ae9b944cd1741b to your computer and use it in GitHub Desktop.
Save rianfowler/52fc07e4b1cddb9ca7ae9b944cd1741b 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: 'Release',
initial: 'release',
states: {
release: {
on: {
RELEASE: 'releasing',
}
},
releasing: {
after: {
2000: 'released',
},
on: {
CANCEL: 'release',
}
},
released: {
after: {
2000: 'release',
},
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment