Skip to content

Instantly share code, notes, and snippets.

@monooso
Created April 30, 2020 15:42
Show Gist options
  • Save monooso/ee888eec836301680d79797b6989f810 to your computer and use it in GitHub Desktop.
Save monooso/ee888eec836301680d79797b6989f810 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: 'keywordResearch',
initial: 'idle',
states: {
idle: {
on: {
researchRequest: "cleaning"
}
},
cleaning: {
on: {
cleaned: "fetchingSerps"
}
},
fetchingSerps: {
on: {
serpsFetched: "identifyingCandidates"
}
},
identifyingCandidates: {
on: {
candidatesIdentifed: "fetchingUrlMetrics"
}
},
fetchingUrlMetrics: {
on: {
urlMetricsFetched: "rankingCandidates"
}
},
rankingCandidates: {
on: {
candidatesRanked: "generatingResults"
}
},
generatingResults: {}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment