Skip to content

Instantly share code, notes, and snippets.

@happylinks
Last active December 2, 2019 12:08
Show Gist options
  • Save happylinks/058c682d2d56f13bcc9e2c0b84bd38da to your computer and use it in GitHub Desktop.
Save happylinks/058c682d2d56f13bcc9e2c0b84bd38da 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: 'layer',
initial: 'idle',
states: {
idle: {
on: {
DISCARD: 'discarded',
},
},
discarded: {
onEntry: sendParent(ctx => ({ type: "TODO.DELETE", id: ctx.id }))
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment