awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
mobxjs avatar

mobxjs/mobx-state-tree

0
View on GitHub↗
7,050 estrellas·636 forks·TypeScript·MIT·13 vistasmobx-state-tree.js.org↗

Mobx State Tree

MobX State Tree is a structured, tree-based state management library for JavaScript applications that combines typed model definitions with reactive snapshots and patch-based change tracking. It provides a reactive state container with runtime and compile-time type safety, where application state is defined as a tree of typed models with collocated actions, computed views, and lifecycle hooks for predictable state mutations.

The library is built around an action-centric mutation model that encapsulates all state changes within named functions that directly modify the tree, supported by generator-based asynchronous flows that yield promises for clean async state mutations. It includes a reference and relationship system that links related models via lightweight identifier references for normalized data management, and provides immutable snapshots and JSON Patch streams that enable time-travel debugging, undo/redo patterns, and state persistence. Middleware hooks allow intercepting actions before execution for logging, modification, or cancellation.

The library supports defining structured models with typed properties, computed values, enumerations, unions, refinements, custom types, and identifier-based references for cross-tree lookups. It offers snapshot creation and application, patch recording and replay, model cloning, node destruction and detachment, and environment dependency injection. TypeScript types can be derived automatically from model definitions for compile-time safety, and the library integrates with UI frameworks by observing state changes and re-rendering components reactively.

Documentation covers model definition, action management, async flows, middleware, references, snapshots, patches, and TypeScript integration.

Features

  • State Model Definitions - Defines the core typed state models with properties, actions, and lifecycle hooks that structure the entire library.
  • Tree-Based State Containers - Provides a structured, tree-based reactive state container with typed models, actions, and snapshot support.
  • Tree-Wide - Marks properties as immutable identifiers unique across the entire tree for reconciliation and reference resolution.
  • Data Modeling Types - Defines application state as typed models with properties and actions, enforcing runtime type safety.
  • Mutation Protection - Locks models so only actions can modify state, preventing accidental direct mutations.
  • State Tree Model Linkers - Links model instances via lightweight identifier references for efficient cross-entity relationships.
  • State Snapshots - Updates a model tree and all its descendants to match a previously captured plain-object snapshot.
  • Reference-Based Denormalization - Keeps data normalized internally while allowing interaction through denormalized references.
  • Reference-Based Data Normalization - Links related models via lightweight identifier references for normalized data management.
  • JSON Patching - Applies JSON Patch operations to model instances to modify their state.
  • Patch Stream Change Tracking - Emits JSON Patch streams for every mutation, enabling fine-grained observation and replay of state changes.
  • State Snapshots - Restores a model instance's state from a previously captured plain-object snapshot.
  • Snapshot-Based State Restoration - Recreates a model instance or applies a snapshot to restore a previous state.
  • Application State Persistences - Provides snapshot and patch mechanisms for saving and restoring application state to storage backends.
  • Model Action Definitions - Defines custom behaviors and operational logic for data models through collocated action functions.
  • Collocated Action and View Definitions - Defines models with collocated actions, computed views, and lifecycle hooks for predictable state mutations.
  • Model Instantiation - Instantiates observable state tree models from plain data, enabling reactive state management.
  • State Tree Model Instance Linkers - Links model instances by identifier references for efficient relationships without embedding full objects.
  • State Tree Reference Creators - Creates identifier-based references between models for normalized data relationships within the state tree.
  • Class Instance to Plain Object Converters - Converts a model tree into an immutable plain JavaScript object for transport or serialization.
  • Identifier-Based Model Linkers - Stores identifiers to link related models, enabling efficient relationships without data duplication.
  • Identifier-Based Model References - Links related data entities across a state tree using lightweight identifier references for normalized data management.
  • Identifier-Based Model References - Links related models via lightweight identifier references for normalized data management and cross-tree lookups.
  • Undo-Redo State History - Reverses applied patches to revert state changes, supporting undo/redo patterns without manual state tracking.
  • Time-Travel Debuggers - Records state snapshots and replays them to move forward or backward through state history.
  • Asynchronous Generator Runners - Provides utilities that execute generator functions by treating yielded promises as sequential steps.
  • Reactive State Typing - Manages application state using typed models that enforce structure and provide runtime validation without boilerplate code.
  • Generator-Based Async Flows - Ships generator-based async flows that yield promises for clean asynchronous state mutations.
  • Runtime Type Validation - Checks property assignments against defined runtime types, preventing accidental data type mismatches.
  • State Tree Node Resolvers by Identifier - Resolves state tree nodes by their declared identifier, enabling cross-tree lookups and references.
  • Type Checking - Validates values against runtime type definitions to ensure data conforms to model schemas.
  • Typed Property Declarations - Declares typed properties with defaults for state models, a fundamental part of model definition.
  • Action Interceptors - Provides action interceptors that capture and process action objects before they reach the state reducer.
  • Asynchronous Action Handling - Implements patterns for wrapping asynchronous operations to track pending states and manage errors during state transitions.
  • Generator-Based Async Actions - Defines asynchronous actions using generator functions that yield promises for clean async state mutations.
  • Action Dispatch Middleware - Provides interceptors that wrap the action dispatch process to handle side effects and logging.
  • Action Lifecycle Middleware - Hooks into action execution to log, modify, or cancel state changes for auditing, validation, or cross-cutting concerns.
  • Action Interception Patterns - Implements event-driven patterns that intercept and block pending actions before they execute.
  • Subtree Action Interceptions - Provides middleware hooks to intercept actions on any subtree of the state tree.
  • State Snapshots - Produces plain JSON snapshots of the entire state tree for time-travel debugging and state persistence.
  • Patch Stream Change Trackings - Generates immutable snapshots and JSON Patch streams for time-travel debugging, undo/redo, and state persistence.
  • Type-Safe Model Definitions - Defines state shape using runtime type annotations that also generate TypeScript types for compile-time safety.
  • Reactive Computed Values - Declares read-only computed properties that automatically recompute when their observed dependencies change.
  • State Tree Cross-Tree Reference Resolvers - Looks up referenced nodes by identifier type across the entire state tree to link related data.
  • Action-Driven State Mutations - Implements action-driven state mutations where state changes are triggered by processing discrete event objects.
  • Direct Mutation Actions - Replaces reducer dispatch with callable functions that directly mutate state, simplifying state change logic.
  • State Modeling - Defines reactive, tree-like state models with mutable but protected data for safe state management.
  • Model Type Compositions - Provides model composition as a core mechanism for building complex state models from simpler ones.
  • Running Action Contexts - Provides a built-in mechanism to retrieve the context of the currently executing action for introspection.
  • State Tree Node Resolvers by Path - Resolves state tree nodes by their JSON path, enabling programmatic navigation and access.
  • Time-Travel Debuggings - Ships snapshot and patch streams enabling time-travel debugging and state history inspection.
  • MobX Implementations - Leverages MobX's observable system to automatically track dependencies and re-render only when observed data changes.
  • Custom Data Types - Creates custom immutable types with serializable representations for values like dates or decimals.
  • Enumeration Types - Creates string-based enumeration types from a list of allowed values.
  • State Tree Node Detachments - Ships a detach function that removes a node from its parent and turns it into an independent tree.
  • JSON Patch Recorders - Captures all JSON Patch operations applied to a subtree for later replay or inspection.
  • JSON Patch Replayers - Replays recorded JSON Patch operations onto a model to restore or modify its state.
  • Deep Class Instance Cloning - Creates deep independent copies of state tree nodes as new standalone trees.
  • Lazy Type Definitions - Defines lazily evaluated types for recursive or circular type definitions.
  • Static Type Inference - Infers TypeScript types from runtime type definitions to gain compile-time type safety automatically.
  • Literal Type Definitions - Defines types that accept only a single specific value.
  • Action Replay Mechanisms - Provides systems for re-dispatching historical sequences of actions to recreate specific state transitions.
  • Environment Dependency Injections - Provides environment dependency injection into the state tree, accessible to all models via getEnv.
  • Multiple Middleware Handlers - Supports attaching multiple middleware handlers to a single node for action interception.
  • Immutable Data Storage - Stores serializable JSON values as immutable data that snapshots as-is and ignores internal changes.
  • State Tree Node Destructions - Provides a destroy function that removes nodes from the state tree and marks them as unusable.
  • Observable State Management - Watches state tree changes and automatically re-renders components to keep the user interface in sync.
  • TypeScript Type Synthesis - Derives TypeScript types from model definitions for auto-completion and static analysis without manual annotations.
  • Action Description Recorders - Captures all actions invoked on a subtree as serializable action call descriptions for replay.
  • Snapshot Serialization Customizations - Applies custom transformations when generating or applying snapshots using a dedicated processor type.
  • Selective Re-rendering - Splits observer components so each re-renders only when its specific observed data changes.
  • Parameterized State Views - Defines reusable, read-only parameterized views that filter or transform state data on demand.
  • Model Action Call Listeners - Provides a notification system for model action invocations with serializable argument payloads.
  • Subtree Action Listeners - Ships a listener subscription mechanism that fires on any action invocation within a subtree.
  • JSON Patch Listeners - Provides a listener that fires on every JSON Patch applied to a subtree for change tracking.
  • Change Observers - Triggers re-renders or snapshot listeners automatically when observed model properties are modified.
  • Runtime - Supports defining union types that are validated at runtime within the state tree.
  • Side Effect Management Libraries - Manages complex asynchronous side effects directly within the state container without separate effect hooks.

Historial de estrellas

Gráfico del historial de estrellas de mobxjs/mobx-state-treeGráfico del historial de estrellas de mobxjs/mobx-state-tree

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Alternativas open-source a Mobx State Tree

Proyectos open-source similares, clasificados según cuántas características comparten con Mobx State Tree.
  • zalmoxisus/redux-devtools-extensionAvatar de zalmoxisus

    zalmoxisus/redux-devtools-extension

    13,460Ver en GitHub↗

    This project is a state management inspector and debugging tool for Redux. It provides a browser-based interface for inspecting and modifying application state and actions in real time, serving as an action logger and time travel debugger to troubleshoot application logic. The tool allows users to navigate a chronological history of state changes to replay previous versions of the application or skip specific actions. It also functions as a remote monitoring bridge, streaming Redux state and actions from non-browser environments to a centralized debugging interface. The capability surface in

    JavaScriptdebugdevtoolsextension
    Ver en GitHub↗13,460
  • reswift/reswiftAvatar de ReSwift

    ReSwift/ReSwift

    7,594Ver en GitHub↗

    ReSwift is a unidirectional data flow framework for Swift applications that centralizes state management within a single store. It ensures predictable and traceable updates by requiring all state modifications to occur through explicit actions processed by reducer functions. The library includes a state time travel debugger that records and replays sequences of actions to reload or rewind the application state. It also provides an asynchronous action dispatcher to handle side effects and network requests while maintaining synchronized state updates. The framework covers a broad surface of st

    Swift
    Ver en GitHub↗7,594
  • day8/re-frameAvatar de day8

    day8/re-frame

    5,532Ver en GitHub↗

    re-frame is a functional framework for building single-page applications in ClojureScript. It provides a centralized, immutable database that serves as the single source of truth for the entire application state, enforcing a strict unidirectional data flow where events trigger state transitions and subsequent view updates. The framework distinguishes itself through a reactive signal graph and an interceptor-based middleware pipeline. By treating application logic as a sequence of data-driven events and declarative side effects, it decouples business logic from the view layer. This architectur

    Clojureclojurescriptre-framereact
    Ver en GitHub↗5,532
  • reflux/refluxjsAvatar de reflux

    reflux/refluxjs

    5,323Ver en GitHub↗

    Refluxjs is a state management library designed to implement a unidirectional dataflow architecture. It manages application state through a strict cycle of actions and stores to prevent unpredictable update loops. The library coordinates asynchronous operations by managing event streams and triggering related success or failure actions. It also provides a global state registry that tracks store states via unique identifiers, enabling deep cloning for persistence and time-travel debugging. Its capability surface covers centralized state management, including the creation of data stores and de

    JavaScript
    Ver en GitHub↗5,323
Ver las 30 alternativas a Mobx State Tree→

Preguntas frecuentes

¿Qué hace mobxjs/mobx-state-tree?

MobX State Tree is a structured, tree-based state management library for JavaScript applications that combines typed model definitions with reactive snapshots and patch-based change tracking. It provides a reactive state container with runtime and compile-time type safety, where application state is defined as a tree of typed models with collocated actions, computed views, and lifecycle hooks for predictable state mutations.

¿Cuáles son las características principales de mobxjs/mobx-state-tree?

Las características principales de mobxjs/mobx-state-tree son: State Model Definitions, Tree-Based State Containers, Tree-Wide, Data Modeling Types, Mutation Protection, State Tree Model Linkers, State Snapshots, Reference-Based Denormalization.

¿Qué alternativas de código abierto existen para mobxjs/mobx-state-tree?

Las alternativas de código abierto para mobxjs/mobx-state-tree incluyen: zalmoxisus/redux-devtools-extension — This project is a state management inspector and debugging tool for Redux. It provides a browser-based interface for… reswift/reswift — ReSwift is a unidirectional data flow framework for Swift applications that centralizes state management within a… reflux/refluxjs — Refluxjs is a state management library designed to implement a unidirectional dataflow architecture. It manages… day8/re-frame — re-frame is a functional framework for building single-page applications in ClojureScript. It provides a centralized,… gaearon/redux-devtools — Redux DevTools is a state management debugger and visualizer for Redux applications. It provides a set of interfaces… gaearon/redux-thunk — Redux-thunk is a middleware for Redux that enables action creators to return functions instead of plain objects. It…