awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com

TypeScript State Machine Libraries

Ranking updated Jun 30, 2026

For a state machine library for TypeScript apps, the strongest matches are statelyai/xstate (XState is the leading TypeScript state machine and statechart), chakra-ui/zag (Zag is a headless UI state machine library written) and reactjs/redux (Redux is a predictable state container for global state). pmndrs/zustand and rackt/redux round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

These open-source libraries provide robust tools for implementing finite state machines within TypeScript applications.

TypeScript State Machine Libraries

Find the best repos with AI.We'll search the best matching repositories with AI.
  • statelyai/xstatestatelyai avatar

    statelyai/xstate

    29,734View on GitHub↗

    XState is a statechart logic library and finite state machine framework used to model complex application behavior. It provides a system for defining states, events, and transitions to govern how a system responds to inputs through a formal schema. The project includes a visual state machine editor that allows for the design of state machine diagrams which automatically generate the corresponding logic and code. It implements an actor model to manage independent concurrent entities that communicate via asynchronous events to coordinate behavioral flows. The framework covers event-driven stat

    XState is the leading TypeScript state machine and statechart library that provides typed state and event definitions, hierarchical and parallel states, declarative transitions, and built-in visualisation tooling, making it a perfect fit for building complex application logic with framework integration support.

    TypeScriptStatechartsVisual State Machine Editors
    View on GitHub↗29,734
  • chakra-ui/zagchakra-ui avatar

    chakra-ui/zag

    5,121View on GitHub↗

    Zag is a headless UI state machine library that provides unstyled component logic to ensure consistent behavior across different rendering engines. It functions as a toolkit for modeling complex user interface interactions using statecharts, decoupling the underlying logic and accessibility attributes from visual styling. The library is framework-agnostic, utilizing specialized adapters to bridge its state machine logic with various JavaScript libraries such as React, Solid, Vue, and Svelte. This approach allows developers to maintain a single interaction model while applying any CSS or styli

    Zag is a headless UI state machine library written in TypeScript that models complex interactions using statecharts, with framework-specific adapters for React, Vue, Solid, and Svelte — it fits as a finite state machine library, though its focus on UI component logic rather than general-purpose state machines and the lack of built-in visualization tooling keep it from being the most comprehensive example.

    TypeScriptStatecharts
    View on GitHub↗5,121
  • reactjs/reduxreactjs avatar

    reactjs/redux

    61,503View on GitHub↗

    Redux is a global state management library and predictable state container for JavaScript applications. It implements a store pattern that maintains the entire application state as a single source of truth, ensuring consistent behavior across different components and environments. The library relies on a unidirectional data flow where state updates follow a strict one-way cycle. This is achieved through a system of discrete actions, pure-function reducers, and a centralized store to ensure that state transitions remain predictable and traceable. The framework includes capabilities for monito

    Redux is a predictable state container for global state management, not a dedicated finite state machine or statechart library — it lacks built-in support for hierarchical, parallel, or history states, and provides no visualisation tooling.

    TypeScriptPure Reducer CompositionsAction-Based State Transitions
    View on GitHub↗61,503
  • pmndrs/zustandpmndrs avatar

    pmndrs/zustand

    58,371View on GitHub↗

    Zustand is a state management library that provides a centralized store for managing shared application data. It functions as a reactive container that connects application state to components, allowing them to subscribe to specific slices of data and trigger updates automatically. By utilizing selector-based data access and immutable state updates, the library ensures that components only re-render when their observed data changes, maintaining a predictable and efficient data flow. The library distinguishes itself through a pluggable, middleware-based architecture that allows for the extensi

    Zustand is a general-purpose state management library for React, not a finite state machine or statechart library — it lacks the core concepts of states, transitions, hierarchy, and statechart tooling that this search requires.

    TypeScriptType-Safe State ArchitecturesType-Safe State Definitions
    View on GitHub↗58,371
  • rackt/reduxrackt avatar

    rackt/redux

    61,509View on GitHub↗

    Redux is a JavaScript state management library that serves as a centralized state container for application data. It operates as a predictable state machine, maintaining the entire application state in a single immutable object tree to ensure a consistent source of truth. The library enforces a unidirectional data flow architecture where the state is read-only and can only be modified by dispatching action objects. State transitions are calculated by applying pure reducer functions to the current state and a specific action, ensuring that data updates are deterministic and trackable. The sys

    Redux is a general-purpose state management library for JavaScript/TypeScript that uses a unidirectional data flow and pure reducers, but it lacks built-in support for hierarchical states, parallel states, history, and declarative statechart transitions — features you need for a dedicated finite state machine or statechart library.

    TypeScriptPure State TransitionsAction-Based State Transitions
    View on GitHub↗61,509
  • reactjs/react-reduxreactjs avatar

    reactjs/react-redux

    23,473View on GitHub↗

    React Redux is a global state management bridge and a set of bindings that connect React components to a Redux state store. It serves as a communication layer and state store connector, allowing a declarative user interface to synchronize with a centralized source of truth. The library enables the synchronization of shared global state across an application by providing mechanisms to read state and dispatch actions directly from the view layer. It ensures predictable state transitions by bridging the gap between UI components and the Redux state container. The project covers core capabilitie

    React Redux is a React binding for Redux's global state store, which manages application state via actions and reducers but does not provide finite state machine capabilities like hierarchical states, parallel states, or statechart tooling — it's a different paradigm of state management, not a state machine library.

    TypeScriptReact State BindingsAction-Based State Transitions
    View on GitHub↗23,473
  • reduxjs/reduxreduxjs avatar

    reduxjs/redux

    61,511View on GitHub↗

    Redux is a predictable state container designed to manage global application data through a centralized store. It operates on a unidirectional data flow architecture where state transitions are triggered by dispatching action objects, which are then processed by pure reducer functions to produce a new, immutable state tree. This approach ensures that application data remains consistent and traceable across the entire component hierarchy. The library distinguishes itself through a functional pattern that relies on pure functions for state logic and a middleware-based extension system. This mid

    Redux is a general-purpose state management library based on actions and reducers, but it lacks explicit finite state machine concepts like typed states, hierarchical states, and statechart visualisation, so it is not a finite state machine library for TypeScript.

    TypeScriptPure Reducer Compositions
    View on GitHub↗61,511
  • dvajs/dvadvajs avatar

    dvajs/dva

    16,164View on GitHub↗

    Dva is a state management library and client-side application framework designed for building user interfaces with React and Redux. It functions as an asynchronous logic orchestrator and a single page application router, organizing application data through a structured data flow of reducers, effects, and subscriptions. The framework distinguishes itself through the use of generator functions to manage asynchronous workflows and sequential side effects, keeping these operations separate from synchronous state updates. It implements namespace-based model organization to group business logic and

    Dva is a state management framework for React/Redux using reducers and effects, not a dedicated finite state machine or statechart library — it lacks typed state/event definitions, hierarchical/parallel states, and declarative state transitions.

    JavaScriptReact State Bindings
    View on GitHub↗16,164
  • pytransitions/transitionspytransitions avatar

    pytransitions/transitions

    6,548View on GitHub↗

    Transitions is an object-oriented finite state machine library for Python. It provides a framework for managing valid states and the logic for moving between them, including implementations for asynchronous state machines and thread-safe state managers. The library supports hierarchical state machines that allow states to be nested to organize complex subtasks and logical contexts. It includes tools for generating visual diagrams of states and transitions to document machine logic. The project covers state management primitives such as lifecycle callbacks, conditional transition guarding, an

    Transitions is a finite state machine library for Python, not TypeScript, so it does not match the language requirement despite supporting hierarchical states and visualisation.

    PythonState Machine Visualizations
    View on GitHub↗6,548
  • gcanti/fp-tsgcanti avatar

    gcanti/fp-ts

    11,523View on GitHub↗

    fp-ts is a TypeScript library that brings pure functional programming patterns to the language through algebraic data types, type class abstractions, and composable combinators. It provides foundational data types like Option for optional values, Either for typed error handling, and Task for lazy asynchronous computations, all designed to make invalid states unrepresentable and side effects explicit. The library is built on category theory concepts, offering type classes such as Functor, Applicative, Monad, Semigroup, and Monoid with lawful instances for common data structures. The library di

    fp-ts is a general-purpose functional programming toolkit with algebraic data types and category theory abstractions, not a dedicated finite state machine or statechart library — it provides primitives you could use to build one, but it does not offer typed states, hierarchical nesting, visualisation, or framework integrations out of the box.

    TypeScriptPure State Transitions
    View on GitHub↗11,523
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
statelyai/xstate29.7KTypeScriptMITJun 22, 2026
chakra-ui/zag5.1KTypeScriptMITJun 22, 2026
reactjs/redux61.5KTypeScriptMITJun 13, 2026
pmndrs/zustand58.4KTypeScriptMITJun 22, 2026
rackt/redux61.5KTypeScriptMITJun 22, 2026
reactjs/react-redux23.5KTypeScriptMITJun 15, 2026
reduxjs/redux61.5KTypeScriptMITJun 22, 2026
dvajs/dva16.2KJavaScriptMITAug 6, 2025
pytransitions/transitions6.5KPythonMITSep 11, 2025
gcanti/fp-ts11.5KTypeScriptMITApr 20, 2026

Related searches

  • a runtime type validation library for TypeScript
  • a dependency injection library for TypeScript
  • a state management library for frontend frameworks
  • a state management library for Flutter apps
  • a schema validation library for TypeScript
  • an agent framework for TypeScript apps
  • a library for building typescript cli tools
  • a state management library for Vue