Repolode
mobxjs

mobxjs/mobx

Simple, scalable state management for JavaScript and TypeScript apps, with automatic dependency tracking and optimal re-rendering.

Stars
28,216
Forks
1,811
Open issues
18
Last commit
13 hours ago

What is it?

MobX is a state management library for JavaScript and TypeScript. You mark data as observable and write normal assignments to change it; MobX tracks at runtime which computations and UI components read each value, and re-runs only the ones affected by a change.

State can be modeled as plain classes or objects with makeAutoObservable, and derived values are computed automatically from observable state. Components wrapped with observer, such as React components via mobx-react-lite, re-render only when the specific fields they read are updated, so manual memoization and selectors are generally unnecessary.

Because MobX is not tied to any UI framework, state logic can live outside components and be tested on its own. The project's documentation is hosted at mobx.js.org.

Key features

  • 01Automatically tracks which state each computation or component reads at runtime.
  • 02Lets you update state with plain JavaScript assignments, including in async code.
  • 03Derives computed values from observable state without manual wiring.
  • 04Re-renders React components only when the fields they use change, via observer.
  • 05Works independently of any UI framework, so state can be tested in isolation.

Use cases

  • Managing shared application state in a React front end with minimal boilerplate.
  • Building UI state that needs to update precisely when specific fields change.
  • Keeping business logic in plain classes that are decoupled from the view layer and easy to unit test.

Quick start

  1. 1

    Read the documentation at mobx.js.org

  2. 2

    Install the mobx package from npm

    npm install mobx

In collections

Topics

FAQ

What is mobx?
Simple, scalable state management for JavaScript and TypeScript apps, with automatic dependency tracking and optimal re-rendering. MobX is a state management library for JavaScript and TypeScript. You mark data as observable and write normal assignments to change it; MobX tracks at runtime which computations and UI components read each value, and re-runs only the ones affected by a change.
Is mobx free to use? What license does it have?
mobx is open source under the MIT license. Check the license terms before using it in commercial products.
Is mobx still maintained?
Actively maintained. The last commit to mobx was on Nov 7, 2026.
What can I use mobx for?
Managing shared application state in a React front end with minimal boilerplate. Building UI state that needs to update precisely when specific fields change. Keeping business logic in plain classes that are decoupled from the view layer and easy to unit test.
How do I install mobx?
Read the documentation at mobx.js.org Install the mobx package from npm: npm install mobx
Where can I get mobx?
The source code and installation instructions are on GitHub: https://github.com/mobxjs/mobx

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects