Skip to content

Instantly share code, notes, and snippets.

@prufrock
Last active August 31, 2021 02:06
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 prufrock/2c4fdc786a08fa0cc6d80713be4ba0c2 to your computer and use it in GitHub Desktop.
Save prufrock/2c4fdc786a08fa0cc6d80713be4ba0c2 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: 'CalcWindow',
initial: 'validInput',
context: {
retries: 0
},
states: {
validInput: {
on: {
dotProductButtonPressed: 'validInput',
invalidVectorInput: 'invalidInput',
validVectorInput: 'validInput'
}
},
invalidInput: {
on: {
invalidVectorInput: 'invalidInput',
validVectorInput: 'validInput'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment