Skip to content

Instantly share code, notes, and snippets.

@shedali
Last active October 28, 2020 16:43
Show Gist options
  • Save shedali/9eaf8fcb2b468484a7a67fd6ba991ebe to your computer and use it in GitHub Desktop.
Save shedali/9eaf8fcb2b468484a7a67fd6ba991ebe to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: 'no-basket',
initial: 'no-basket',
states: {
"no-instruments":{
},
"no-basket": {
on: {
CREATE_BASKET: "basket-created"
}
},
'basket-created':{
on: {
ADD_INSTRUMENT: "instruments-added"
}
},
"instruments-added":{
on:{
REMOVE_INSTRUMENT: "no-instruments"
}
},
executed:{
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment