Last active
July 31, 2019 00:06
-
-
Save chuanqisun/7c835d985d143f240d4844f4dc735d00 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ | |
id: 'fetch', | |
initial: 'Start', | |
states: { | |
"Start": { | |
on: { | |
CREATE: 'Private editing', | |
} | |
}, | |
"Private editing": { | |
on: { | |
CHECKIN: 'Private stowed', | |
EDIT: 'Private editing', | |
SAVE: 'Private editing', | |
DISCARD: 'Private stowed', | |
} | |
}, | |
"Private stowed": { | |
on: { | |
CHECKOUT: 'Private editing', | |
PUBLISH: 'Public stowed', | |
} | |
}, | |
"Public stowed": { | |
on: { | |
CHECKOUT: 'Public editing', | |
PUBLISH: 'Public stowed', | |
UNPUBLISH: 'Private stowed', | |
} | |
}, | |
"Public editing": { | |
on: { | |
CHECKIN: 'Public stowed', | |
EDIT: 'Public editing', | |
SAVE: 'Public editing', | |
DISCARD: 'Public stowed', | |
} | |
}, | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment