Last active
November 27, 2020 08:09
-
-
Save yonbergman/c0bd6d9434f8f297734fb0c933241b99 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ | |
id: '5ZMbQ0yCDM4L3qFNHBINNU', | |
initial: 'welcome', | |
states: { | |
"welcome": { | |
on: { | |
'Get Started': '20a1q5MKdlnTmtrQoABkr1' | |
} | |
}, | |
'20a1q5MKdlnTmtrQoABkr1': { | |
meta: { | |
name: "intro 1" | |
}, | |
on: { | |
"Next": "2fGOjutcPBsgIrLNt3RPyL" | |
} | |
}, | |
"2fGOjutcPBsgIrLNt3RPyL": { | |
on: { | |
"Next": "1JPd80oeLTMWarzyBT2OfO" | |
} | |
}, | |
"1JPd80oeLTMWarzyBT2OfO": { | |
on: { | |
"Yes": "t2DzU8gzrIefUt5zmsQVI", | |
"No": {target: 'step', actions: assign({stepId: '3J6aANWeQgRoGRmKTmeJMa'})}, | |
"I'm not sure": {target: 'step', actions: assign({stepId: 'VroJlA5HsYFygAXdGMfFy'})}, | |
} | |
}, | |
"t2DzU8gzrIefUt5zmsQVI": { | |
on: { | |
"Yes": "61bFhHH2vMJ4xYVQk6LcIi", | |
"Not yet": "61bFhHH2vMJ4xYVQk6LcIi", | |
} | |
}, | |
"61bFhHH2vMJ4xYVQk6LcIi": { | |
on: { | |
"Yes": "3pDM9MnK0Qdz32o3VloLgA", | |
"I'm not sure": {target: 'step', actions: assign({stepId: '7DtJe6rVsfrpCVu1VjlFjF'})}, | |
} | |
}, | |
"3pDM9MnK0Qdz32o3VloLgA": { | |
on: { | |
"Yes": {target: 'step', actions: assign({stepId: '3RFny6bR4zzws75EmiSRgc'})}, | |
"No, it's someone else": {target: 'step', actions: assign({stepId: '3RFny6bR4zzws75EmiSRgc'})}, | |
"There is no executor mentioned": {target: 'step', actions: assign({stepId: '3RFny6bR4zzws75EmiSRgc'})}, | |
} | |
}, | |
step: { | |
type: 'final' | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment