Last active
March 14, 2021 09:41
-
-
Save rahulsivalenka/7d8c7c185ee2d08f4ce53c015798567a 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
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