Last active
October 19, 2020 00:40
-
-
Save tomByrer/5fa06c66661cb363425937e679a4e0b6 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const spinnerMachine = Machine({ | |
id: 'spinner', | |
initial: 'stopped', | |
states: { | |
stopped: { | |
on: { | |
FOOT_DOWN: 'running', | |
}, | |
}, | |
running: { | |
on: { | |
FOOT_UP: 'stopped', | |
}, | |
}, | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
XState Tutorial 01: Wool spinner with just footswitch.