Skip to content

densorokin/state-machine

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published