Last active
August 31, 2020 15:36
-
-
Save signaes/c3b0802e95db399de8b2d56dc8c83b31 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 defineProgramMobileMachine = Machine({ | |
id: 'defineProgramMobile', | |
initial: 'idle', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
idle: { | |
on: { | |
DEFINE_WORKOUTS: 'define_workouts', | |
WEEKLY_VIEW: 'weekly_view', | |
} | |
}, | |
define_workouts: { | |
on: { | |
BACK: 'idle', | |
COMMIT: 'idle', | |
}, | |
}, | |
weekly_view: { | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
BACK: '#defineProgramMobile.idle', | |
DEFINE_WORKOUTS: 'define_workouts', | |
DEFINE_DAY: 'define_day', | |
}, | |
}, | |
define_workouts: { | |
on: { | |
BACK: 'idle', | |
COMMIT: 'idle', | |
}, | |
}, | |
define_day: { | |
on: { | |
BACK: 'idle', | |
COMMIT: 'idle', | |
}, | |
}, | |
} | |
}, | |
}, | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment