Skip to content

Instantly share code, notes, and snippets.

View lauriliivamagi's full-sized avatar

Lauri Liivamägi lauriliivamagi

  • Relion Info
  • Estonia
View GitHub Profile
const fileMachine = Machine({
id: 'file',
type: 'parallel',
states: {
subscription: {
initial: 'init',
states: {
init: {
on: {
UPLOAD: 'pending'
const fileMachine = Machine({
id: 'file',
type: 'parallel',
states: {
upload: {
initial: 'idle',
states: {
idle: {
on: {
INIT_UPLOAD: 'pending'
@lauriliivamagi
lauriliivamagi / machine.js
Last active June 19, 2020 12:19
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions