Skip to content

Instantly share code, notes, and snippets.

View samihult's full-sized avatar

Sami dos Santos Hult samihult

View GitHub Profile
@samihult
samihult / machine.js
Last active February 28, 2021 09:28
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'field',
context: {
value: '',
output: ''
},
type: 'parallel',
states: {
value: {
initial: 'empty',
@samihult
samihult / machine.js
Last active December 28, 2020 10:11
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'field',
context: {
value: '',
output: ''
},
type: 'parallel',
states: {
value: {
initial: 'empty',
@samihult
samihult / machine.js
Last active January 1, 2021 00:24
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'field',
context: {
value: '',
output: ''
},
type: 'parallel',
states: {
value: {
initial: 'empty',
@samihult
samihult / machine.js
Last active January 1, 2021 00:25
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'field',
type: 'parallel',
states: {
value: {
initial: 'empty',
states: {
empty: {
on: {
change: 'not empty'
@samihult
samihult / machine.js
Last active December 28, 2020 10:10
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'field',
type: 'parallel',
states: {
value: {
initial: 'empty',
states: {
empty: {},
'not empty': {}
}
@samihult
samihult / machine.js
Last active December 28, 2020 10:10
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'field',
type: 'parallel',
states: {
value: {
},
phase: {
}
}
});
@samihult
samihult / machine.js
Created September 1, 2020 17:52
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions