Skip to content

Instantly share code, notes, and snippets.

View barucAlmaguer's full-sized avatar
⚛️
Reacting

Baruc barucAlmaguer

⚛️
Reacting
  • valiot.io
  • Monterrey, México
View GitHub Profile
@barucAlmaguer
barucAlmaguer / machine.js
Last active August 25, 2021 20:34
Generated by XState Viz: https://xstate.js.org/viz
const timelineUiMachine = {
initial: 'loading_timeline',
states: {
loading_timeline: {
onEntry: ['clearExcelData', 'fetchTimelineData'],
on: {
SUCCESS: [
{
target: 'viewing_empty_timeline',
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@barucAlmaguer
barucAlmaguer / machine.js
Last active February 28, 2021 21:42
Generated by XState Viz: https://xstate.js.org/viz
const locCounterMachine = Machine({
id: 'locCounter',
initial: 'parsing_global',
context: {
total: 0,
global: 0,
blocks: {
// functionX: 0
},
currentBlock: null,
@barucAlmaguer
barucAlmaguer / machine.js
Created December 1, 2020 21:57
Generated by XState Viz: https://xstate.js.org/viz
const loginMachine = Machine(
{
initial: 'howToLogin',
context: {
ssoUrl: undefined,
email: '',
password: '',
error: undefined,
client: undefined,
},
@barucAlmaguer
barucAlmaguer / machine.js
Last active November 25, 2020 01:43
Generated by XState Viz: https://xstate.js.org/viz
const triviaMachine = Machine({
id: 'trivia',
initial: 'home',
context: {
questions: [],
answers: [],
currentQuestion: 0,
totalQuestions: 10
},
const timelineUiMachine = {
initial: 'loading_timeline',
states: {
loading_timeline: {
onEntry: ['fetchTimelineData'],
on: {
SUCCESS: [
{
target: 'viewing_empty_timeline',
cond: 'isDataOutOfRange',
@barucAlmaguer
barucAlmaguer / machine.js
Created February 28, 2020 21:11
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@barucAlmaguer
barucAlmaguer / machine.js
Created January 17, 2020 19:13
Generated by XState Viz: https://xstate.js.org/viz
const CoilScheduleMachine = Machine({
id: 'CoilSchedule',
context: {
job: {},
csv: [],
balances: [],
startAt: null,
coilsPath: null,
railsPath: null,
errors: [],
@barucAlmaguer
barucAlmaguer / machine.js
Created January 15, 2020 23:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@barucAlmaguer
barucAlmaguer / machine.js
Last active January 11, 2020 17:29
Generated by XState Viz: https://xstate.js.org/viz
const usersMachine = Machine({
id: 'usersMachine',
type: 'parallel',
context: {
users: [],
selectedUser: null,
permissionTypes: null
},
initial: 'viewing_users',
states: {