Skip to content

Instantly share code, notes, and snippets.

@theKashey
Created June 13, 2018 06:03
Show Gist options
  • Save theKashey/d1aab71ee7aae5e775539c647818d752 to your computer and use it in GitHub Desktop.
Save theKashey/d1aab71ee7aae5e775539c647818d752 to your computer and use it in GitHub Desktop.
const lightMachine = Machine({
key: 'light',
initial: 'green',
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