Last active
March 11, 2020 13:28
-
-
Save avanslaars/aa43320d5bd11d3212c34963aaeef52c 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 SignalMachine = Machine({ | |
id: 'signal', | |
initial: 'red', | |
states: { | |
red: { | |
after: { | |
1000: 'green', | |
}, | |
}, | |
green: { | |
after: { | |
1000: 'yellow', | |
}, | |
}, | |
yellow: { | |
after: { | |
1000: 'red', | |
}, | |
}, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment