Skip to content

Instantly share code, notes, and snippets.

@danabrams
Created August 12, 2020 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danabrams/bc5ad23d6c91be9884fd6fb33274624d to your computer and use it in GitHub Desktop.
Save danabrams/bc5ad23d6c91be9884fd6fb33274624d to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const lightSwitchMachine = Machine({
id: 'lightSwitch',
initial: 'turnedOff',
states: {
turnedOn: {
on: {
SWITCH: 'turnedOff'
},
},
turnedOff: {
on: {
SWITCH: 'turnedOn'
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment