Created
June 1, 2020 19:15
-
-
Save mtheoryx/d781bcb5ae93964c65b3d43b67a18b6b 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
const lightBulbMachine = Machine({ | |
id: "lightBulb", | |
initial: "unlit", | |
states: { | |
lit: { | |
on: { | |
BREAK: "broken", | |
TOGGLE: "unlit", | |
}, | |
}, | |
unlit: { | |
on: { | |
BREAK: "broken", | |
TOGGLE: "lit", | |
}, | |
}, | |
broken: { type: "final" }, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment