Skip to content

Instantly share code, notes, and snippets.

@hustKiwi
Last active February 13, 2020 01:59
Show Gist options
  • Save hustKiwi/407927bfe1a9f68dee0812453ff5f74c to your computer and use it in GitHub Desktop.
Save hustKiwi/407927bfe1a9f68dee0812453ff5f74c to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// 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