Skip to content

Instantly share code, notes, and snippets.

View pociej's full-sized avatar

Grzegorz Pociejewski pociej

View GitHub Profile
import { useEffect, useState } from "react";
interface Robot {
id: string;
name: string;
state: "picking" | "idle" | "error";
throughputUph: number; // units per hour
lastSeen: number;
}
@pociej
pociej / machine.js
Last active October 18, 2023 10:33
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
types: {},
id: "simpleMachine",
initial: "initial",
context: { value: 0 },
states: {
initial: {
on: {
@pociej
pociej / machine.js
Created October 18, 2023 07:22
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions