Created
June 24, 2021 19:22
-
-
Save wlee221/54bdd4db735f8ed7def646abeb7c1ef4 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
Machine( | |
{ | |
id: 'signUp', | |
initial: "edit", | |
exit: ["clearFormValues", "clearError"], | |
states: { | |
edit: { | |
on: { | |
SUMBIT: "submit" | |
} | |
}, | |
error: { | |
on: { | |
SUMBIT: "submit" | |
} | |
}, | |
submit: { | |
invoke: { | |
src: "signIn", | |
onDone: { | |
actions: "setUser", | |
target: "resolved" | |
}, | |
onError: { | |
actions: "setCognitoError", | |
target: 'error' | |
} | |
} | |
}, | |
resolved: { | |
type: 'final' | |
} | |
}, | |
}, | |
{ | |
guards: { | |
pwMatches: (context, event) => { | |
return false; | |
}, | |
}, | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment