Skip to content

Instantly share code, notes, and snippets.

@jpwesselink
Created November 8, 2019 13:24
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 jpwesselink/6f257e3dd4fe72062d58bb10f9b66058 to your computer and use it in GitHub Desktop.
Save jpwesselink/6f257e3dd4fe72062d58bb10f9b66058 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const connectionCheckerMachine = Machine({
id: 'light',
initial: 'green',
states: {
green: {
on: {
TIMER: 'yellow',
WHATEVER: 'red'
}
},
yellow: {
on: {
TIMER: 'red'
}
},
red: {
on: {
TIMER: 'green'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment