Skip to content

Instantly share code, notes, and snippets.

@ryanbethel
Last active May 9, 2020 09:01
Show Gist options
  • Select an option

  • Save ryanbethel/d488a248a789eebe6f0ef3536868132c to your computer and use it in GitHub Desktop.

Select an option

Save ryanbethel/d488a248a789eebe6f0ef3536868132c 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: 'fetch',
initial: 'unknown',
context: {
retries: 0
},
states: {
unknown: {
on:{
SEND_LOGIN:'waiting',
SEND_LOGOUT:'waiting',
}
},
waiting:{},
authorizing: {
},
success: {
},
failure: {
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment