Skip to content

Instantly share code, notes, and snippets.

@daver182
Last active March 31, 2020 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daver182/ca1ab70ff4ac31314510e7dc00b59761 to your computer and use it in GitHub Desktop.
Save daver182/ca1ab70ff4ac31314510e7dc00b59761 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const buscarStates = {
id: 'file',
type: 'parallel',
states: {
upload: {
initial: 'idle',
states: {
idle: {
on: {
INIT_UPLOAD: 'pending'
}
},
pending: {
on: {
UPLOAD_COMPLETE: 'success'
}
},
success: {}
}
},
download: {
initial: 'idle',
states: {
idle: {
on: {
INIT_DOWNLOAD: 'pending'
}
},
pending: {
on: {
DOWNLOAD_COMPLETE: 'success'
}
},
success: {}
}
},
resaltar: {
initial: "idle",
states: {
idle: {
},
resaltar_cuadro_texto: {
},
resaltar_regiones: {
},
resaltar_ordenar: {
},
},
on: {
RESALTAR_CUADRO_TEXTO: ".resaltar_cuadro_texto",
RESALTAR_REGIONES: ".resaltar_regiones",
RESALTAR_ORDENAR: ".resaltar_ordenar"
},
}
}
};
const yapoMachine = Machine({
key: "estado",
initial: "vista_inicio",
states: {
vista_inicio: {
on: {
VER_VISTA_BUSQUEDA: "vista_busqueda",
},
},
vista_busqueda: {
on: {
VOLVER: "vista_inicio",
},
...buscarStates
},
vista_resultados: {
on: {
VER_VISTA_BUSQUEDA: "vista_busqueda",
},
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment