Created
September 13, 2019 16:25
-
-
Save jeremy-green/43b3b028816889868bb5740fbfc828c8 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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
new Machine({ | |
id: 'wink-bootstrapper', | |
initial: 'bootstrap', | |
states: { | |
bootstrap: { | |
invoke: { | |
src: () => Promise.all([new Promise(r => setTimeout(r, 1500)), new Promise(r => setTimeout(r, 2500)), new Promise(r => setTimeout(r, 500))]), | |
onDone: { | |
target: 'ready', | |
actions: [() => console.log('ready!!!')], | |
}, | |
}, | |
}, | |
ready: { | |
type: 'final', | |
}, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment