Skip to content

Instantly share code, notes, and snippets.

@tomByrer
Last active October 19, 2020 00:40
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 tomByrer/5fa06c66661cb363425937e679a4e0b6 to your computer and use it in GitHub Desktop.
Save tomByrer/5fa06c66661cb363425937e679a4e0b6 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const spinnerMachine = Machine({
id: 'spinner',
initial: 'stopped',
states: {
stopped: {
on: {
FOOT_DOWN: 'running',
},
},
running: {
on: {
FOOT_UP: 'stopped',
},
},
}
});
@tomByrer
Copy link
Author

XState Tutorial 01: Wool spinner with just footswitch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment