Created
January 6, 2020 10:49
-
-
Save janczizikow/a096f1f7e8d5194a4348a7317091c077 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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 registerMachine = Machine({ | |
| id: 'intercomLogin', | |
| initial: 'unregistered', | |
| context: { | |
| retries: 0 | |
| }, | |
| states: { | |
| unregistered: { | |
| on: { | |
| confirmEmail: 'isConfirmed' | |
| } | |
| }, | |
| isConfirmed: { | |
| on: { | |
| updateEmail: 'isUpdating', | |
| } | |
| }, | |
| isUpdating: { | |
| on: { | |
| confirmEmail: 'emailUpdated' | |
| } | |
| }, | |
| emailUpdated: { | |
| on: { | |
| updateIntercomInfo: 'isConfirmed', | |
| } | |
| } | |
| } | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment