Skip to content

Instantly share code, notes, and snippets.

View AndresRodH's full-sized avatar
🇻🇪
👾

Andres Rodriguez AndresRodH

🇻🇪
👾
View GitHub Profile
@AndresRodH
AndresRodH / cloudSettings
Last active February 19, 2020 19:39
VSCode
{"lastUpload":"2020-02-19T19:38:47.939Z","extensionVersion":"v3.4.3"}
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@AndresRodH
AndresRodH / machine.js
Last active July 10, 2020 20:31
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@AndresRodH
AndresRodH / machine.js
Last active August 7, 2020 22:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@AndresRodH
AndresRodH / machine.js
Last active August 20, 2020 18:18
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@AndresRodH
AndresRodH / machine.js
Last active December 15, 2020 13:42
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@AndresRodH
AndresRodH / machine.js
Last active October 28, 2020 13:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@AndresRodH
AndresRodH / machine.js
Last active November 20, 2020 21:26
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@AndresRodH
AndresRodH / machine.js
Last active November 28, 2020 15:42
Example 1
const doTheThingMachine = Machine({
id: 'do-the-thing',
initial: 'validating',
states: {
validating: {},
handlingThings: {},
success: {
type: 'final',
},
failure: {
@AndresRodH
AndresRodH / machine.js
Last active November 28, 2020 15:42
Example 2
const doTheThingMachine = Machine({
id: 'do-the-thing',
initial: 'validating',
states: {
validating: {
invoke: {
src: 'validateArgs',
onDone: 'handlingThings',
onError: {
target: 'failure',