Skip to content

Instantly share code, notes, and snippets.

@ZempTime
Created September 17, 2019 17:39
Show Gist options
  • Save ZempTime/f07b56d9dfd72e808c5e5f6a779f91ca to your computer and use it in GitHub Desktop.
Save ZempTime/f07b56d9dfd72e808c5e5f6a779f91ca to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const lightMachine = Machine({
id: 'light',
initial: 'green',
type: 'compound',
states: {
green: {
on: {
TIMER: 'yellow'
}
},
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