Last active
September 3, 2020 17:55
-
-
Save She-Codes/8deadba46f07d35a275668de6db25b1c 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
const rtsLoaded = true; | |
const config = { | |
id: 'rts', | |
initial: rtsLoaded ? 'requested' : 'idle', | |
context: { | |
rtsId: null, | |
memberKey: null, | |
instance: 'instance', | |
}, | |
states: { | |
idle: {}, | |
requesting: { | |
entry: 'sendRequest' | |
}, | |
cancelling: { | |
entry: 'sendCancellation' | |
}, | |
cancelled: {}, | |
requested: {} | |
} | |
}; | |
const rtsMachine = Machine(config, { | |
actions: { | |
sendRequest: () => {}, | |
sendCancellation: () => {} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment