Skip to content

Instantly share code, notes, and snippets.

@drmikecrowe
Created September 17, 2020 09:04
Show Gist options
  • Save drmikecrowe/9449a4cf0fe3599153f2e91d27147edf to your computer and use it in GitHub Desktop.
Save drmikecrowe/9449a4cf0fe3599153f2e91d27147edf to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "formModal",
initial: "closed",
states: {
closed: {
on: {
OPEN: "opened"
}
},
opened: {
on: {
CLOSE: "closed",
SUBMIT: "submitting"
}
},
submitting: {
on: {
SUCCESS: "closed",
FAILURE: "opened"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment