Skip to content

Instantly share code, notes, and snippets.

@Lucas-Geitner
Created December 17, 2019 10:56
Show Gist options
  • Save Lucas-Geitner/0a83fbfe682ddd449154c3fbc749e07b to your computer and use it in GitHub Desktop.
Save Lucas-Geitner/0a83fbfe682ddd449154c3fbc749e07b to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const createDonationMachine = Machine({
id: "createDonation",
initial: "inactive",
states: {
inactive: { on: { TOGGLE: "not_normalize" } },
not_normalize: { on: { TOGGLE: "send_slack_notification" } },
send_slack_notification: { on: { TOGGLE: "send_email_notification" } },
send_email_notification: { on: { TOGGLE: "send_to_identity" } },
send_to_identity: { on: { TOGGLE: "updatePetition" } },
updatePetition: { on: { TOGGLE: "active" } },
active: { on: { TOGGLE: "inactive" } }
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment