Skip to content

Instantly share code, notes, and snippets.

@jimmyhchan
Created September 23, 2020 23:15
Show Gist options
  • Save jimmyhchan/6bc7b7e82ec2ccc15a6b9a0b5d8294a1 to your computer and use it in GitHub Desktop.
Save jimmyhchan/6bc7b7e82ec2ccc15a6b9a0b5d8294a1 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: 'click_to_add',
initial: 'ready',
context: {
},
states: {
ready: {
on: {
click_add: 'adding'
}
},
adding: {
on: {
RESOLVE: 'success',
}
},
success: {
type: 'final'
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment