Skip to content

Instantly share code, notes, and snippets.

@jcdickinson
Last active July 2, 2021 00:58
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 jcdickinson/3a41a5db7c223fa479c27f199e50047d to your computer and use it in GitHub Desktop.
Save jcdickinson/3a41a5db7c223fa479c27f199e50047d to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
initial: "dragging",
context: {},
entry: "log",
states: {
dragging: {
on: {
pointerup: "drop",
pointermove: {
target: "dragging",
actions: "updateTransform"
}
}
},
drop: {
type: "final",
entry: ["preventDefault", "log"]
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment