2.5.0 • Published 2 years ago

timsy v2.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

timsy

Agnostic functional state machine with epic type support

Example

import { createStates, createMachine } from 'timsy'

const states = createStates({
    FOO: () => ({}),
    BAR: () => ({})
})

const spawn = createMachine(states, {
    FOO: {
      SWITCH: () => () => states.BAR()
    },
    BAR: {
      SWITCH: () => () => states.FOO()
    }
})

const machine = spawn(states.FOO())

machine.events.SWITCH()

const currentState = machine.getState()

const dispose = machine.subscribe((state, event, prevState) => {})
3.0.0-rc2

2 years ago

3.0.0-rc1

2 years ago

3.0.0-rc5

2 years ago

3.0.0-rc4

2 years ago

3.0.0-rc3

2 years ago

2.3.0

2 years ago

2.2.1

2 years ago

2.5.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.4.2

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.4.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago