Skip to content

Instantly share code, notes, and snippets.

@ryanatkn
Created May 31, 2021 21:29
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 ryanatkn/6ce647de0e18fb889d5b07da355e0093 to your computer and use it in GitHub Desktop.
Save ryanatkn/6ce647de0e18fb889d5b07da355e0093 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: 'onboard',
initial: 'begin',
states: {
begin: {
on: {NEXT: 'voluntary'},
},
voluntary: {
on: {NEXT: 'informed', PREVIOUS: 'begin'},
},
informed: {
on: {NEXT: 'revertible', PREVIOUS: 'voluntary'},
},
revertible: {
on: {NEXT: 'specific', PREVIOUS: 'informed'},
},
specific: {
on: {NEXT: 'unburdensome', PREVIOUS: 'revertible'},
},
unburdensome: {
on: {NEXT: 'end', PREVIOUS: 'specific'},
},
end: {
on: {PREVIOUS: 'unburdensome'},
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment