Skip to content

Instantly share code, notes, and snippets.

@She-Codes
Last active September 3, 2020 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save She-Codes/8deadba46f07d35a275668de6db25b1c to your computer and use it in GitHub Desktop.
Save She-Codes/8deadba46f07d35a275668de6db25b1c to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
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