Last active
June 11, 2021 18:17
-
-
Save bflemi3/62cfb4ee9008c7b289d25c55f521baf2 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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