Skip to content

Instantly share code, notes, and snippets.

@rahulsivalenka
Last active March 14, 2021 09:41
Show Gist options
  • Save rahulsivalenka/7d8c7c185ee2d08f4ce53c015798567a to your computer and use it in GitHub Desktop.
Save rahulsivalenka/7d8c7c185ee2d08f4ce53c015798567a to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const stepperMachine = Machine({
id: 'stepper',
initial: 'selectDecisionFlow',
states: {
'selectDecisionFlow': {
on: {
next: 'selectDataSource',
},
},
'selectDataSource': {
on: {
next: 'selectPaddingAndDestination',
back: 'selectDecisionFlow',
},
},
'selectPaddingAndDestination': {
on: {
next: 'review',
back: 'selectDataSource',
},
},
'review': {
on: {
back: 'selectPaddingAndDestination',
submit: 'submit'
},
},
'submit': {
initial: 'submitting',
states: {
submitting: {
on: {
success: 'success',
failed: 'failure'
}
},
success: {
type: 'final'
},
failure: {
type: 'final'
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment