Last active
May 11, 2020 07:40
-
-
Save LeonLiuY/50942b81c8f43576d310b807c7fd7c5b 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({ | |
"states": { | |
"init": { | |
"on": { | |
"": [ | |
{ | |
"target": "screenerQuestionFirst", | |
"cond": "screenerQuestionFirst" | |
}, | |
{ | |
"target": "resumeFirst", | |
"cond": "resumeFirst" | |
} | |
] | |
} | |
}, | |
"screenerQuestionFirst": { | |
"states": { | |
"sq": { | |
"on": { | |
"NEXT": "resume" | |
} | |
}, | |
"resume": { | |
"on": { | |
"PREV": "sq", | |
"NEXT": "preview" | |
} | |
}, | |
"preview": { | |
"on": { | |
"PREV": "resume" | |
}, | |
"type": "final" | |
} | |
}, | |
"id": "screenerQuestionFirst", | |
"initial": "sq" | |
}, | |
"resumeFirst": { | |
"states": { | |
"resume": { | |
"on": { | |
"NEXT": "sq" | |
} | |
}, | |
"sq": { | |
"on": { | |
"PREV": "resume", | |
"NEXT": "preview" | |
} | |
}, | |
"preview": { | |
"on": { | |
"PREV": "sq" | |
}, | |
"type": "final" | |
} | |
}, | |
"id": "resumeFirst", | |
"initial": "resume" | |
} | |
}, | |
"id": "smartApply", | |
"initial": "init" | |
}, | |
{ | |
guards:{ | |
resumeFirst: () => true, | |
screenerQuestionFirst: ()=> false | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment