A TypeScript library for creating and managing state machines.
npm install @bemedev/app-ts
# or
yarn add @bemedev/app-ts
- Typed state machine creation
- Public and private context management
- Support for actions, guards and delays
- Transition and event handling
- Support for nested machines
import { createMachine } from '@bemedev/app-ts';
const machine = createMachine({
initial: 'idle',
states: {
idle: {
on: {
START: 'running',
},
},
running: {
on: {
STOP: 'idle',
},
},
},
});
Contributions are welcome! Please read our contribution guide for details.
MIT
chlbri (bri_lvi@icloud.com)