Skip to content

Instantly share code, notes, and snippets.

View thiagoadsix's full-sized avatar

Thiago Andrade Silva thiagoadsix

View GitHub Profile
Config do compose:
version: "3"
services:
redis:
image: redis:alpine
networks:
- frontend
deploy:
@thiagoadsix
thiagoadsix / machine.js
Created August 21, 2020 17:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@thiagoadsix
thiagoadsix / machine.js
Created August 21, 2020 17:54
Generated by XState Viz: https://xstate.js.org/viz
const typeMarriageMachine = Machine({
id: 'typeMarriageMachine',
initial: 'prepareQuestion',
context: {
data: {}
},
states: {
prepareQuestion: {
entry: 'entry1',
on: {
@thiagoadsix
thiagoadsix / machine.js
Created August 21, 2020 17:54
Generated by XState Viz: https://xstate.js.org/viz
const typeMarriageMachine = Machine({
id: 'typeMarriageMachine',
initial: 'prepareQuestion',
context: {
data: {},
},
states: {
prepareQuestion: {
entry: ['prepareQuestion'],
on: {
@thiagoadsix
thiagoadsix / machine.js
Last active September 23, 2020 13:38
Generated by XState Viz: https://xstate.js.org/viz
const bookingMachine = Machine({
id: 'booking',
initial: 'allSquiresQueried',
context: {
retries: 0,
},
states: {
allSquiresQueried: {
on: {
FETCH: 'loading',
@thiagoadsix
thiagoadsix / machine.js
Last active September 24, 2020 20:36
Generated by XState Viz: https://xstate.js.org/viz
const bookingMachine = Machine({
id: 'booking',
initial: 'choosing',
states: {
choosing: {
type: 'parallel',
states: {
squire: {
initial: 'querying',
states: {
@thiagoadsix
thiagoadsix / machine.js
Last active September 25, 2020 14:44
Generated by XState Viz: https://xstate.js.org/viz
const bookingMachine = Machine({
id: 'booking',
initial: 'choosing',
states: {
choosing: {
type: 'parallel',
states: {
squire: {
initial: 'querying',
states: {
@thiagoadsix
thiagoadsix / machine.js
Created September 28, 2020 12:11
Generated by XState Viz: https://xstate.js.org/viz
const bookingMachine = Machine({
id: 'booking',
initial: 'choosing',
states: {
choosing: {
type: 'parallel',
states: {
squire: {
initial: 'queryingSquire',
states: {
@thiagoadsix
thiagoadsix / machine.js
Last active October 1, 2020 13:52
Generated by XState Viz: https://xstate.js.org/viz
const bookingMachine = Machine(
{
id: 'booking',
initial: 'marriage',
states: {
marriage: {
type: 'parallel',
states: {
squire: {
initial: 'queryingSquire',
@thiagoadsix
thiagoadsix / machine.js
Created September 29, 2020 20:25
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'choosing',
states: {
choosing: {
type: 'parallel',
states: {
squire: {
initial: 'querying',
states: {