Skip to content

Instantly share code, notes, and snippets.

@hiroMTB
Last active July 27, 2021 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroMTB/693c005df5f058ede72f972e8e60ecac to your computer and use it in GitHub Desktop.
Save hiroMTB/693c005df5f058ede72f972e8e60ecac 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: 'sv_office',
initial: 'title',
context: {
retries: 0
},
states: {
title: {
on: {
OK: 'intro'
}
},
intro: {
on: {
OK: 'office_intro',
}
},
office_intro: {
on: {
OK: 'sv_office',
}
},
sv_office: {
on: {
Desk: "Desk",
Walls: "Walls",
Vox: "Vox",
}
},
Desk: {
on: {
OK: "sv_office"
}
},
Walls: {
on: {
OK: "sv_office"
}
},
Vox: {
on: {
OK: "puzzle1a"
}
},
puzzle1a: {
on: {
OK: "sv_office"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment