Skip to content

Instantly share code, notes, and snippets.

@mhedges1
Last active September 22, 2020 22:58
Show Gist options
  • Save mhedges1/5fa75a3c265ab55d4bee15045009d49f to your computer and use it in GitHub Desktop.
Save mhedges1/5fa75a3c265ab55d4bee15045009d49f 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({
id: 'consent-status',
initial: 'loading',
context: {
consent: {
ePub: () => {},
openTrust: () => {}
},
},
states: {
loading: {
on: {
SYNCD: "inSync",
DE_SYNCD: 'outOfSync'
}
},
inSync: {
on: {
DE_SYNCD: 'outOfSync'
}
},
outOfSync: {
on: {
SYNCD: 'inSync'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment