Last active
July 15, 2020 08:31
-
-
Save Addono/2cccde93b8c36974fc5ebe6e4c147595 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 fetchMachine = Machine({ | |
id: 'verifiedLocation', | |
initial: 'registeringListener', | |
states: { | |
registeringListener: { | |
on: { LISTENING: 'listening' }, | |
}, | |
listening: { | |
on: { READY: 'ready' }, | |
}, | |
ready: { | |
on: { SUBMIT: 'submitting' }, | |
}, | |
submitting: { | |
on: { | |
GRANTED: 'success', | |
REVOKED: 'revoked', | |
FAILED: 'failed' | |
}, | |
entry: 'submit', | |
}, | |
success: { | |
on: { SUBMIT: 'submitting' }, | |
}, | |
revoked: { | |
on: { SUBMIT: 'submitting' }, | |
}, | |
failed: { | |
on: { SUBMIT: 'submitting' }, | |
}, | |
}, | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment