Skip to content

Instantly share code, notes, and snippets.

@joaom182
Created November 9, 2021 21:52
Show Gist options
  • Save joaom182/5eccd22f6398153ba881fd3d5758703d to your computer and use it in GitHub Desktop.
Save joaom182/5eccd22f6398153ba881fd3d5758703d 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: 'initial',
initial: 'verify_authorized_representative',
entry: ['assignDisclosureCards'],
states: {
verify_authorized_representative: {
on: {
NEXT: 'disclosures_loop'
}
},
disclosures_loop: {
on: {
NEXT: [
{
target: 'success',
cond: 'is_last_disclosure',
},
{
target: 'disclosures_loop'
}
],
BACK: 'verify_authorized_representative'
}
},
success: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment