Skip to content

Instantly share code, notes, and snippets.

@gustavo-depaula
Created July 24, 2019 23:45
Show Gist options
  • Save gustavo-depaula/9c717a18aba8f8ce636ca4dd6bdfc225 to your computer and use it in GitHub Desktop.
Save gustavo-depaula/9c717a18aba8f8ce636ca4dd6bdfc225 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: 'NEW_WAYPOINT',
initial: 'action creator',
context: {
retries: 0
},
states: {
'action creator': {
on: {
NEW_WAYPOINT: 'waypoint middleware'
}
},
'waypoint middleware': {
on: {
UPDATE_ORDER: 'reducer'
}
},
reducer: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment