Skip to content

Instantly share code, notes, and snippets.

@yinonov
Last active January 7, 2020 16:40
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 yinonov/545dea729394fa7d25369e1c55ae54b9 to your computer and use it in GitHub Desktop.
Save yinonov/545dea729394fa7d25369e1c55ae54b9 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: 'binding',
initial: 'idle',
context: {
retries: 0
},
states: {
idle:{
on:{
DRAG: 'resizing',
SELECT: 'grouping'
}
},
grouping:{
on:{
DROP: 'pause',
CANCEL:'idle'
}
},
pause:{
on:{
BIND: 'wrapping',
CANCEL:'idle'
}
},
resizing:{
on:{
DROP: 'wrapping',
CANCEL:'idle'
}
},
wrapping:{
on:{
SUCCESS: 'idle',
CANCEL:'idle',
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment