Skip to content

Instantly share code, notes, and snippets.

@plugboy
Last active April 30, 2020 17:24
Show Gist options
  • Save plugboy/18029be835fa8f17a411cdc0d3c558cf to your computer and use it in GitHub Desktop.
Save plugboy/18029be835fa8f17a411cdc0d3c558cf to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const stateMachine = Machine(
{
id: 'stateMachine',
initial: 'idle',
context: {
file: undefined,
svg: undefined,
error: undefined
},
states: {
idle: {
on: {
click: {
target: 'idle',
},
change: {
target: 'filePicked',
}
}
},
filePicked: {
},
readFile: {
},
wrongFileType: {
},
fileLoaded: {
},
loadFailed: {
}
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment