Skip to content

Instantly share code, notes, and snippets.

@justinobney
Created May 30, 2021 13:36
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 justinobney/d4cb2dd4af6ed4359c8b689596c96133 to your computer and use it in GitHub Desktop.
Save justinobney/d4cb2dd4af6ed4359c8b689596c96133 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: "root",
states: {
Actionable: {
id: "Actionable",
states: {},
on: { stage: "#Staged" },
},
Staged: {
id: "Staged",
states: {},
on: { schedule: "#Scheduled", skip: "#Skipped" },
},
Scheduled: {
id: "Scheduled",
states: {},
on: { cancel: "#Cancelled", process: "#Processing" },
},
Processing: {
id: "Processing",
states: {},
on: { complete: "#Processed" },
},
Processed: { id: "Processed", states: {} },
Cancelled: { id: "Cancelled", states: {} },
Skipped: { id: "Skipped", states: {} },
},
initial: "Actionable",
on: {},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment