Skip to content

Instantly share code, notes, and snippets.

@joelseq
Created September 21, 2021 23:19
Show Gist options
  • Save joelseq/5aa147ca3ab7ac7e9ef81d5ca019f05b to your computer and use it in GitHub Desktop.
Save joelseq/5aa147ca3ab7ac7e9ef81d5ca019f05b 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 saveQueueMachine = Machine({
id: 'save-queue',
initial: 'none',
states: {
none: {
on: {
QUEUE_SAVE: 'one',
}
},
one: {
on: {
QUEUE_SAVE: 'two',
SUCCESS: 'none',
FAIL: 'none',
}
},
two: {
on: {
QUEUE_SAVE: 'two',
SUCCESS: 'one',
FAIL: 'one',
}
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment