Skip to content

Instantly share code, notes, and snippets.

View jbeast's full-sized avatar

Chris Smith jbeast

View GitHub Profile
@jbeast
jbeast / machine.js
Last active April 20, 2021 21:35
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jbeast
jbeast / machine.js
Last active March 2, 2021 16:44
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jbeast
jbeast / machine.js
Created March 2, 2021 12:07
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jbeast
jbeast / events.ejs.t
Last active December 19, 2020 08:27
Hygen generator for an XState machine (in TypeScript)
---
to: src/lib/machines/<%= name %>/<%= name %>Events.ts
---
import { <%= Name %>Event } from "./<%= name %>Types";
/**
* Event creator for an {@link InitEvent}
*/
export function init(message: string): <%= Name %>Event {
return {
@jbeast
jbeast / machine.js
Created November 13, 2020 16:20
Generated by XState Viz: https://xstate.js.org/viz
const validateBarcode = () => {};
const findLabware = () => {};
const labwareScannerMachine = Machine({
key: 'labwareScanner',
initial: 'idle',
states: {
idle: {
id: "idle",
initial: "normal",
@jbeast
jbeast / about.md
Last active August 29, 2015 14:18 — forked from jasonrudolph/about.md
@jbeast
jbeast / ComponentFactory.js
Last active August 29, 2015 13:57
S2's Future
define([
"components/Manifest"
// Plus lots of other components
], function() {
var components = {};
_.each(arguments, registerComponent);
function registerComponent(component) {