Skip to content

Instantly share code, notes, and snippets.

View machine.js
// contrived example - reads from the `context` and sends
// the dynamically created event
const sendNameObjectFn = send((context, event) => ({
type: 'NAME',
name: context.user.name
}));
const sendNameObject = send({ type: 'NAME' });
const sendNameString = send('NAME');
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@mikaelkaron
mikaelkaron / machine.ts
Created Jun 7, 2019
App XState machine with routing
View machine.ts
// Available variables:
// Machine (machine factory function)
// assign (action)
// XState (all XState exports)
const send = XState.send;
const fetchMachine = Machine({
id: 'app',
View gist:d5273ec6bb248b6014716269ea575d0a
Verifying that "mikaelkaron.id" is my Blockstack ID. https://explorer.blockstack.org/name/mikaelkaron.id
View gist:77de7cf779ea4526141f0e3654d23b57
Verifying my Blockstack ID is secured with the address 18q7afzib633kN75SDPPZc4NfRsspY9Agj https://explorer.blockstack.org/address/18q7afzib633kN75SDPPZc4NfRsspY9Agj