Skip to content

Instantly share code, notes, and snippets.

View kellyjandrews's full-sized avatar
I don't get it.

Kelly Andrews kellyjandrews

I don't get it.
View GitHub Profile
@kellyjandrews
kellyjandrews / machine.js
Last active May 19, 2020 04:31
Generated by XState Viz: https://xstate.js.org/viz
const userMachine = Machine({
id: 'user',
initial: 'active',
states: {
active: {
after: {
60000: 'finished'
}
},
finished: { type: 'final' }
@kellyjandrews
kellyjandrews / machine.js
Last active June 24, 2020 16:07
Generated by XState Viz: https://xstate.js.org/viz
const videoMachine = Machine({
id: 'video',
initial: 'disconnected',
context: {},
states: {
disconnected: {
on: {
JOIN: 'initialize'
}
},
@kellyjandrews
kellyjandrews / machine.js
Last active June 26, 2020 13:28
Generated by XState Viz: https://xstate.js.org/viz
const opentokMachine = Machine({
id: 'meeting',
initial: 'entry',
context: {
sessionId: null,
name: null,
token: null,
session: null,
publisher: null,
streams: null
@kellyjandrews
kellyjandrews / machine.js
Last active June 26, 2020 21:40
Generated by XState Viz: https://xstate.js.org/viz
const promise = (ctx, e) => new Promise((resolve, reject) => {
console.log('got called')
resolve('done');
});
const opentokMachine = Machine({
id: 'opentok',
initial: 'disconnected',
context: {
sessionId: null
const lightBulb = Machine({
id: 'lightBulb',
initial: 'off',
states: {
off: {
on: {
TURN_ON: 'on'
}
},
on: {
@kellyjandrews
kellyjandrews / machine.js
Last active June 29, 2020 17:35
Generated by XState Viz: https://xstate.js.org/viz
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {},
connected: {}
}
});
@kellyjandrews
kellyjandrews / machine.js
Last active June 29, 2020 18:03
Generated by XState Viz: https://xstate.js.org/viz
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {
id: 'disconnected',
initial: 'idle',
states: {
'idle': {},
'init': {},
@kellyjandrews
kellyjandrews / machine.js
Last active June 30, 2020 03:59
Generated by XState Viz: https://xstate.js.org/viz
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {
id: 'disconnected',
initial: 'idle',
states: {
'idle': {},
'init': {},
@kellyjandrews
kellyjandrews / machine.js
Last active June 30, 2020 04:58
Generated by XState Viz: https://xstate.js.org/viz
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {
id: 'disconnected',
initial: 'idle',
states: {
'idle': {
id: 'idle',
@kellyjandrews
kellyjandrews / machine.js
Last active July 2, 2020 13:21
Generated by XState Viz: https://xstate.js.org/viz
const video = Machine({
id: 'video',
initial: 'disconnected',
context: {
sessionId: null,
session: null,
publisher: null,
streams: null,
token: null
},