Created
August 18, 2020 09:24
-
-
Save sriraman/64785a39615b458cf2062d4845d7d07d 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: 'PROFILE', | |
initial: 'idle', | |
context: { | |
user: null | |
}, | |
states: { | |
idle: { | |
on: { | |
SUBMIT: 'updating' | |
} | |
}, | |
updating: { | |
on: { | |
CANCEL: 'idle', | |
UPDATE_FAILED: 'error', | |
UPDATED: 'idle' | |
} | |
}, | |
error: { | |
on: { | |
SUBMIT: 'updating' | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment