Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mobx

> 前端框架
Open source

Simple, scalable state management.

28.2K stars0 likes2 views
WebsiteGitHub

About

Simple, scalable state management.

MobX

Simple, scalable state management.

Documentation

Documentation can be found at mobx.js.org.


Sponsors

MobX is made possible by the generosity of the sponsors below, and many other individual backers. Sponsoring directly impacts the longevity of this project.

🥇🥇 Platinum sponsors ($5000+ total contribution): 🥇🥇


🥇 Gold sponsors ($2500+ total contribution):


🥈 Silver sponsors ($500+ total contributions):

Introduction

Anything that can be derived from the application state, should be. Automatically.

MobX is a signal based, battle-tested library that makes state management simple and scalable by transparently applying functional reactive programming. The philosophy behind MobX is simple:

</div>


    

</div>


    

</div>

A quick example

So what does code that uses MobX look like?

…

The observer wrapper around the TimerView React component will automatically detect that rendering depends on the timer.secondsPassed observable, even though this relationship is not explicitly defined. The reactivity system will take care of re-rendering the component when precisely that field is updated in the future.

Every event (onClick / setInterval) invokes an action (myTimer.increase / myTimer.reset) that updates observable state (myTimer.secondsPassed). Changes in the observable state are propagated precisely to all computations and side effects (TimerView) that depend on the changes being made.

This conceptual picture can be applied to the above example, or any other application using MobX.

Getting started

To learn about the core concepts of MobX using a larger example, check out The gist of MobX page, or take the 10 minute interactive introduction to MobX and React. The philosophy and benefits of the mental model provided by MobX are also described in great detail in the blog posts UI as an afterthought and How to decouple state and UI (a.k.a. you don’t need componentWillMount).

Further resources

  • The MobX cheat sheet (£5) is both useful and sponsors the project
  • 10 minute interactive introduction to MobX and React
  • Egghead.io course, based on MobX 3
  • The MobX awesome list – a long list of MobX resources and example projects

The MobX book

The MobX Quick Start Guide ($24.99) by Pavan Podila and Michel Weststrate is available as an ebook, paperback, and on the O'Reilly platform (see preview).

Videos

  • Introduction to MobX & React in 2020 by Leigh Halliday, 17 min.
  • ReactNext 2016: Real World MobX by Michel Weststrate, 40 min, slides.
  • CityJS 2020: MobX, from mutable to immutable, to observable data by Michel Weststrate, 30 min.
  • OpenSourceNorth: Practical React with MobX (ES5) by Matt Ruby, 42 min.
  • HolyJS 2019: MobX and the unique symbiosis of predictability and speed by Michel Weststrate, 59 min.
  • React Amsterdam 2016: State Management Is Easy by Michel Weststrate, 20 min, slides.
  • {🚀} React Live 2019: Reinventing MobX by Max Gallo, 27 min.

Credits

MobX is inspired by reactive programming principles, which are for example used in spreadsheets. It is inspired by model–view–viewmodel frameworks like MeteorJS's Tracker, Knockout and Vue.js, but MobX brings transparent functional reactive programming (TFRP, a concept which is further explained in the MobX book) to the next level and provides a standalone implementation. It implements TFRP in a glitch-free, synchronous, predictable and efficient manner.

A ton of credit goes to Mendix, for providing the flexibility and support to maintain MobX and the chance to prove the philosophy of MobX in a real, complex, performance critical applications.

Issues· 45 open

View all issuesOpen on GitHub
  • #4705

    Suspended observer renders can retain reactions despite native finalization

    🐛 bugUpdated Sep 15, 2026
  • #4607

    React 19.2x introduced performance tracks cause observables to be accessed outside reaction

    🐛 bugUpdated Aug 20, 2026
  • #3874

    Incompatible with React Forget compiler

    🍗 enhancement✋ on holdUpdated Aug 19, 2026
  • #4594

    eslint react hooks rules do not work when a component is wrapped in observer

    🐛 bugUpdated Oct 30, 2025
  • #3854

    [feature] Investigate running MobX on top of signals standard / polyfill

    🍗 enhancement🚧 experimental🎁 mobxUpdated Sep 25, 2025
  • #3774

    `onBecomeUnobserved` not triggered immediately on `useObserver` component unmount

    🐛 bugUpdated Sep 18, 2025
  • #4248

    New decorators and enumerability

    🐛 bugUpdated Jul 29, 2025
  • #4569

    Change in behaviour in mobx v5 and v6

    🐛 bugUpdated Jul 25, 2025
  • #4561

    Bug: Server functions report false positive errors for MobX observables

    🐛 bugUpdated Jun 15, 2025
  • #3865

    [mobx-react] `Maximum update depth exceeded` error since `mobx-react@8`

    🐛 bugUpdated May 22, 2025

> Tags

TypeScriptjavascriptmobxreactreactive-programming

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架