Skip to content

Instantly share code, notes, and snippets.

@dragouf
Last active February 4, 2021 03:43
Show Gist options
  • Save dragouf/f99a820580ce4136b512839e1455b2f1 to your computer and use it in GitHub Desktop.
Save dragouf/f99a820580ce4136b512839e1455b2f1 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: 'plan',
initial: 'editing',
states: {
editing: {
on: {
REQUEST: 'reviewing'
}
},
reviewing: {
on: {
APPROVE: 'implementing',
REJECT: 'editing'
}
},
implementing: {
on: {
IMPLEMENT: 'implemented'
}
},
implemented: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment