Created
February 6, 2020 07:43
-
-
Save tivac/f356e2d494496f820b38b03d959c7ccc 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
const menuMachine = Machine({ | |
id : "menu", | |
initial : "booting", | |
states : { | |
booting : { | |
on : { | |
// First-time client launches with services | |
BOOTING_FTUE : "ftue", | |
BOOTING_CONTINUE : "continue", | |
BOOTED_OFFLINE : "offline", | |
BOOTED_ONLINE : "online", | |
}, | |
meta : { | |
test : async () => { | |
// TODO: ??? | |
}, | |
}, | |
}, | |
continue : { | |
CONTINUE_CLICK : "online", | |
meta : { | |
test : async () => { | |
}, | |
}, | |
}, | |
ftue : { | |
initial : "idle", | |
states : { | |
idle : { | |
on : { | |
FTUE_CONFIRM : "loadout", | |
}, | |
meta : { | |
test : async () => { | |
}, | |
}, | |
}, | |
loadout : { | |
on : { | |
FTUE_LOADOUT_CONFIRM : "done", | |
}, | |
meta : { | |
test : async () => { | |
}, | |
}, | |
}, | |
done : { | |
type : "final", | |
}, | |
}, | |
onDone : "online", | |
}, | |
offline : { | |
meta : { | |
test : async () => { | |
}, | |
}, | |
}, | |
online : { | |
meta : { | |
test : async () => { | |
}, | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment