Skip to content

Instantly share code, notes, and snippets.

@StanleySathler
Last active April 20, 2020 22:00
Show Gist options
  • Save StanleySathler/7503b53194b4e52cce9769b5331b47c7 to your computer and use it in GitHub Desktop.
Save StanleySathler/7503b53194b4e52cce9769b5331b47c7 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 fetchMachine = Machine({
initial: 'regionsLoading',
states: {
regionsLoading: {
on: {
FINISH_FETCHING_REGIONS: 'propertiesLoading',
},
},
propertiesLoading: {
on: {
FINISH_FETCHING_PROPERTIES: 'idle'
},
},
idle: {
on: {
FETCH_MORE_PROPERTIES: 'propertiesLoadingMore'
}
},
propertiesLoadingMore: {
on: {
FINISH_FETCHING_MORE_PROPERTIES: 'idle'
}
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment