Skip to content

Instantly share code, notes, and snippets.

@schpet
schpet / machine.js
Last active December 3, 2019 17:15
Generated by XState Viz: https://xstate.js.org/viz
const generationSucceeded = (c, e) => {
return e.generationResult && e.generationResult.ok
}
const generationStates = {
initial: "initial",
states: {
initial: {
on: {
GENERATE: [
@schpet
schpet / machine.js
Created January 14, 2020 05:51
Generated by XState Viz: https://xstate.js.org/viz
const configMachine = Machine({
id: "config",
initial: "initial",
strict: true,
context: {
workspace: undefined,
errorMessage: undefined,
config: undefined,
},
states: {
@schpet
schpet / machine.js
Created January 14, 2020 05:58
Generated by XState Viz: https://xstate.js.org/viz
var CommandArgument = {
file: "file",
nearest: "nearest",
none: "none",
}
const findCommandErrorActions = assign({
workspace: (_context, event) => {
return event.data.workspace;
},
@schpet
schpet / machine.js
Created November 17, 2020 21:29
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@schpet
schpet / machine.js
Created December 14, 2020 06:08
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@schpet
schpet / machine.js
Created February 8, 2021 16:58
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@schpet
schpet / machine.js
Created March 2, 2021 21:40
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@schpet
schpet / machine.js
Created March 24, 2021 16:24
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@schpet
schpet / machine.js
Created April 14, 2021 21:29
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@schpet
schpet / machine.js
Created May 6, 2021 01:49
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions