Skip to content

Instantly share code, notes, and snippets.

@prabuw
Last active May 9, 2020 17:55
Show Gist options
  • Save prabuw/752e51f243104c7a6ac4bde3b0d45eeb to your computer and use it in GitHub Desktop.
Save prabuw/752e51f243104c7a6ac4bde3b0d45eeb to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const counterMachine = Machine({
initial: 'red',
states: {
red: {
on: {
'GO': 'green',
}
},
green: {
on: {
'SLOW.DOWN': 'amber'
}
},
amber: {
on: {
'STOP': 'red'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment