state-machine-lib
TypeScript icon, indicating that this package has built-in type declarations

1.0.16 • Public • Published

state-machine-lib

A ReactJS hook to manage state machine

How to use it?

You can use the project in this way:

Install

# with npm
npm install state-machine-lib

Usage

  • Import the package in your app:
import { useStateMachine } from "state-machine-lib";
  • Get the state machine and transition from the hook:
const { transition, machineState } = useStateMachine(initialState, stateMachineConfiguration);

Github repo: state-machine-implementation

Implementation: Web page example

Package Sidebar

Install

npm i state-machine-lib

Weekly Downloads

10

Version

1.0.16

License

MIT

Unpacked Size

7.46 kB

Total Files

12

Last publish

Collaborators

  • insidefree