Created
December 2, 2021 14:15
-
-
Save john-bell-gw/cbc58c0c32bddf3d7b419a16ca766aaa 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 lit = {on: {BREAK: 'broken', TOGGLE: 'unlit'}} | |
const unlit = { | |
on: { | |
BREAK: 'broken', | |
TOGGLE: 'lit' | |
} | |
} | |
const broken = { } | |
const states = { lit, unlit, broken} | |
const initial = 'lit' | |
const config = { | |
id: 'lightbulb', | |
strict: true, | |
initial, | |
states, | |
} | |
const lightBulbMachine = Machine(config) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment