
useStateMachine
The <1 kb state machine hook for React
Batteries Included
Despite the tiny size, useStateMachine is a feature-complete State Machine library, including features like Entry/Exit callbacks, Guarded transitions & Extended State (Context)
Amazing TypeScript experience
Focus on automatic type inference (auto completion for both TypeScript & JavaScript users without having to manually define the typings) while giving you the option to specify and augment the types for context & events.
Made for React
Instead of introducing many new concepts, useStateMachine follow idiomatic React patterns you and your team are already familiar with.
The library itself is actually a thin wrapper around React's useReducer & useEffect.