Last active
August 31, 2021 02:06
-
-
Save prufrock/2c4fdc786a08fa0cc6d80713be4ba0c2 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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
// 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