Skip to content

Instantly share code, notes, and snippets.

@akshay-nm
Last active September 1, 2020 10:24
Show Gist options
  • Save akshay-nm/724a07f6cebd7bf6b1b76abe94ff843d to your computer and use it in GitHub Desktop.
Save akshay-nm/724a07f6cebd7bf6b1b76abe94ff843d 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 confetchMachine = Machine({
id: 'confetch',
initial: 'idle',
context: {
retries: 0,
},
states: {
idle: {
on: {
FETCH: 'loading'
}
},
loading: {
initial: 'reconfiguring',
states: {
reconfiguring: {},
creatingRequest: {},
sendingRequest: {},
waitingForResponse: {},
handlingResponse: {},
handlingError: {},
aborting: {},
}
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment