Skip to content

Instantly share code, notes, and snippets.

@HipsterBrown
Created January 26, 2021 16:22
Show Gist options
  • Save HipsterBrown/963fe6dda2d92f12ddcaab6fc0db813c to your computer and use it in GitHub Desktop.
Save HipsterBrown/963fe6dda2d92f12ddcaab6fc0db813c 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 plaidLinkMachine = Machine({
id: 'plaid-link',
initial: 'intro',
states: {
intro: {
on: {
NEXT: 'widget'
}
},
widget: {
invoke: {
src: 'plaidLinkWidget',
onDone: 'selectingFundingAccount',
onError: 'manualLinkPrompt'
}
},
selectingFundingAccount: {
on: {
NEXT: 'success'
}
},
success: {
onEntry: {
actions: 'callbackWithAccountId',
},
type: 'final'
},
manualLinkPrompt: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment