Last active
February 13, 2020 01:59
-
-
Save hustKiwi/407927bfe1a9f68dee0812453ff5f74c to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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 routesMachine = Machine({"id":"routes","initial":"start","states":{"start":{"on":{"NAVIGATE":[{"cond":"isPaid","target":"paidRoutes"},{"cond":"isNotPaid","target":"planOverviewRoute"}]}},"paidRoutes":{"on":{"NAVIGATE":[{"cond":"isPaymentRoutes","target":"paymentRoutes"},{"cond":"isConnectRoutes","target":"connectRoutes"},{"target":"originalRoute"}]}},"paymentRoutes":{"on":{"NAVIGATE":[{"cond":"isPaid","target":"connectRoutes"},{"cond":"isFromPaymentRoutes","target":"originalRoute"},{"target":"planOverviewRoute"}]}},"connectRoutes":{"on":{"NAVIGATE":[{"cond":"isConnected","target":"customersRoute"},{"target":"partnerCenterWelcomeRoute"}]}},"originalRoute":{},"partnerCenterWelcomeRoute":{"meta":{"finalPath":"/partner-center-welcome"}},"customersRoute":{"meta":{"finalPath":"/customers"}},"planOverviewRoute":{"meta":{"finalPath":"/plan-overview"}}}}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment