Created
January 17, 2020 20:09
-
-
Save llldc21/253e7997d432fb5ae0e248dff4c111bd 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: 'fetch', | |
initial: 'draft', | |
context: { | |
state: 'draft' | |
}, | |
states: { | |
draft: { | |
onEntry: ['test'], | |
after: { | |
run: [ | |
{ target: 'ok' }, | |
{ target: 'fail' } | |
] | |
} | |
}, | |
ok: { | |
type: 'final' | |
}, | |
fail: { | |
type: 'final' | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment