Created
May 5, 2020 19:29
-
-
Save RafalFilipek/9da10999c917c1e1add641c183391466 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 stepTransitions = Machine({ | |
initial: "idle", | |
states: { | |
idle: { | |
id: "idle", | |
on: { | |
START: { target: "inProgress" }, | |
}, | |
}, | |
inProgress: { | |
type: "parallel", | |
onDone: { | |
target: "#idle", | |
}, | |
states: { | |
delay: { | |
initial: "active", | |
states: { | |
active: { | |
after: { | |
1000: { target: "ready" }, | |
}, | |
}, | |
ready: { type: "final" }, | |
}, | |
}, | |
stepState: { | |
initial: "loading", | |
states: { | |
loading: { | |
on: { | |
READY: { target: "ready" }, | |
}, | |
}, | |
ready: { type: "final" }, | |
}, | |
}, | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment