Last active
September 1, 2020 10:24
-
-
Save akshay-nm/724a07f6cebd7bf6b1b76abe94ff843d to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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