Last active
January 13, 2021 19:21
-
-
Save a-laughlin/2de02b2d2d1f6462465a6805a67a4fa4 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ | |
id: 'fetch', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
CLICK_INSURANCE: 'idle', | |
CLICK_PACKAGE: 'idle' | |
} | |
}, | |
// approving: { | |
// on: { | |
// APPROVED_INS: 'approved_package_w_insurance', | |
// APPROVED_PACKAGE_W_INS:'', | |
// DENIED_INS: 'approving_ins', | |
// DENIED_PACKAGE_W_INS:'', | |
// NETWORKERROR_PACKAGE_W_INS:'', | |
// NETWORKERROR_PACKAGE:'', | |
// } | |
// }, | |
// approved_package_w_insurance: { | |
// on:{ | |
// CLICK_CHECKOUT:'on_checkout' | |
// }, | |
// }, | |
// approved_package: { | |
// on:{ | |
// CLICK_CHECKOUT:'on_checkout' | |
// } | |
// }, | |
// on_checkout: { | |
// on:{ | |
// CLICK_CONFIRM:'confirmed' | |
// }, | |
// }, | |
// confirmed: { | |
// type: 'final' | |
// } | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment