Created
April 30, 2020 15:57
-
-
Save tmlangley/25cd6a144097c477d2eb61f0d6428c02 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 pageMachine = Machine({ | |
id: 'homepage', | |
initial: 'idle', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
idle: { | |
on: { | |
REGISTRATION_OPEN: 'registrationOpen', | |
FILTER_OPEN: 'editingFilters', | |
MENU_OPEN: 'menuModalOpen' | |
} | |
}, | |
editingFilters: { | |
on: { | |
FILTER_CLOSE: 'idle' | |
} | |
}, | |
registrationOpen: { | |
on: { | |
REGISTRATION_CLOSE: 'idle' | |
} | |
}, | |
menuModalOpen: { | |
on: { | |
MENU_CLOSE: 'idle' | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment