Created
January 15, 2020 22:26
-
-
Save dustinfreeman/8faadf4fa72c39cead7955345fb92f19 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: 'fetch', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
'System Initiated': 'reactive' | |
} | |
}, | |
reactive: { | |
on: { | |
'wait 10 s': 'idle', | |
'thumbs up': 'full' | |
} | |
}, | |
full: { | |
type: 'final', | |
on: { | |
'sleep': 'idle' | |
} | |
}, | |
'impossible state': { | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment