Last active
September 17, 2020 03:48
-
-
Save tomByrer/64bc1077eb6cb3697c515ab783963f50 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 labelSwitch = Machine( | |
{ | |
id: 'labelSwitch', | |
initial: 'nix', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
nix: { | |
entry: ['activateNix'], | |
on: { | |
CHECK: 'aver', | |
nix_LABEL: 'aver', | |
}, | |
}, | |
aver: { | |
on: { | |
UNCHECK: { | |
target: 'nix', | |
}, | |
AVER_LABEL: 'nix', | |
}, | |
}, | |
}, | |
}, | |
{ | |
actions: { | |
activateNix: () => { | |
console.log("activateNix"); | |
}, | |
}, | |
}, | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment