Skip to content

Instantly share code, notes, and snippets.

@bflemi3
Last active June 11, 2021 18:17
Show Gist options
  • Save bflemi3/62cfb4ee9008c7b289d25c55f521baf2 to your computer and use it in GitHub Desktop.
Save bflemi3/62cfb4ee9008c7b289d25c55f521baf2 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: 'recorder',
initial: 'idle',
states: {
idle: {
on: {
START: 'countdown'
}
},
countdown: {
on: {
DONE: 'start'
}
},
start: {
on: {
PAUSE: 'pause',
STOP: 'stop'
}
},
pause: {
on: {
START: 'start',
STOP: 'stop'
}
},
stop: {
type: 'final'
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment