Created
February 22, 2021 19:42
-
-
Save 7hny/e8f0e07b0ba55b91a2231d095c72b657 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 fetchMachine = Machine({ | |
id: 'fetch', | |
initial: 'fetchConfig', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
fetchConfig: { | |
}, | |
fetchData: { | |
}, | |
loading: { | |
}, | |
investment: { | |
on: { | |
SHOW_BUILDING: 'building', | |
} | |
}, | |
building: { | |
on: { | |
SHOW_INVESTMENT: 'investment', | |
SHOW_APARTMENT: 'apartment', | |
} | |
}, | |
apartment: { | |
on: { | |
SHOW_INVESTMENT: 'investment', | |
SHOW_BUILDING: 'building', | |
} | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment