Skip to content

Instantly share code, notes, and snippets.

@Platekun
Platekun / machine.js
Created December 4, 2019 13:13
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Platekun
Platekun / machine.js
Created January 19, 2020 16:45
Generated by XState Viz: https://xstate.js.org/viz
const WEB_PLAYBACK_API = 'https://api.spotify.com/v1/me/player';
const InitialState = '@Initial';
const ReadyState = '@Ready';
const NotReadyState = '@NotReadyState';
const IdleState = '@Idle';
const PlayState = '@Play';
const RequestingToPlayTrackState = '@Play/Track/Request';
const RequestingToPlayAlbumState = '@Play/Album/Request';
const RequestingToResumeTrackState = '@Resume/Request';
const PlayingState = '@Play/Success';
@Platekun
Platekun / machine.js
Created January 19, 2020 17:02
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Platekun
Platekun / machine.js
Created March 10, 2020 21:49
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: '@mahou/routing',
type: "parallel",
initial: "A",
states: {
routing: {
initial: "brands",
states: {
"brands": {
"on": {
@Platekun
Platekun / machine.js
Created March 30, 2020 19:11
Generated by XState Viz: https://xstate.js.org/viz
Machine({
"id": "Example 1",
"context": {},
"type": "parallel",
"states": {
"routing": {
"initial": "initial",
"states": {
"initial": {
"on": {
@Platekun
Platekun / machine.js
Created December 11, 2020 15:08
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'Unintegrated Tournaments',
initial: 'setUp',
context: {},
states: {
disabled: {
type: 'final',
},
setUp: {
on: {