Created
January 17, 2020 20:10
-
-
Save llldc21/c4dadeaa20aca4d8db466956d68f5ec0 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 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