Skip to content

Instantly share code, notes, and snippets.

@dankremniov
Last active October 21, 2021 14:14
Show Gist options
  • Save dankremniov/7c9b1f28bb54666b516ad4cb51feb55c to your computer and use it in GitHub Desktop.
Save dankremniov/7c9b1f28bb54666b516ad4cb51feb55c to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const fanMachine = Machine({
id: "fan",
initial: "uploadCashFlows",
context: {
cashFlow: null,
previousCashFlowId: null
},
states: {
uploadCashFlows: {
initial: "fromFile",
on: {
NEXT: "calibrate"
},
states: {
fromFile: {
on: {
SWITCH: "fromFile"
}
},
fromPrevious: {
on: {
SWITCH: "fromFile"
}
},
hist: {
type: "history"
}
}
},
calibrate: {
on: {
PREVIOUS: "uploadCashFlows.hist",
NEXT: "preview"
}
},
preview: {
on: {
PREVIOUS: "calibrate"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment