Need advice about which tool to choose?Ask the StackShare community!

MobX

826
504
+ 1
114
Redux

29.7K
22K
+ 1
663
Add tool

MobX vs Redux: What are the differences?

What is MobX? Simple, scalable state management. MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses.

What is Redux? Predictable state container for JavaScript apps. Redux helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.

MobX and Redux belong to "State Management Library" category of the tech stack.

"It's just stupidly simple, yet so magical" is the primary reason why developers consider MobX over the competitors, whereas "State is predictable" was stated as the key factor in picking Redux.

MobX and Redux are both open source tools. Redux with 49.2K GitHub stars and 12.7K forks on GitHub appears to be more popular than MobX with 19.6K GitHub stars and 1.21K GitHub forks.

According to the StackShare community, Redux has a broader approval, being mentioned in 1021 company stacks & 803 developers stacks; compared to MobX, which is listed in 51 company stacks and 32 developer stacks.

Decisions about MobX and Redux
Le Thanh
Why Electron over macOS
  • Since this is a very early stage, so I want to verify the hypothesis so that I go with Electron. It will help you build faster, cross-native app but the trade off is the performance. It's ok, if the app is get product-market fit, we will plan to move it to Native platform to bring high performance for users
Why Recoiljs over Redux or something else Why not Redux? Zustan? DVA?
  • The boilderplace is so fukin hard. Besides, it really hard for optimizing to only render a component that subscribes to a sub-tree state. I need to use selector, memorize, immutable, ...
Why not MobX? MST?
  • It has been a long time since I last use Mobx, MST. It's cool, but now the world has changed a lot, no more Class component, so I don't know it supports a lot.
  • One more thing I don't want to use MobX is that the API is changed a lot in each major version. No! I don't want to use an outdated library for the rest of my life
  • I feel can not control how Component will render when I use MobX
Why Recoil?
  • It solves my concern, each component is subscribed to a very small state object (called atom) and only render once they changed
  • It plays nice with Functional Component. You can easily change useState to useRecoilState and vice versa. It's cool because "Alway use local state, only move it to global once needed"
  • I can map the product concept to state in my brain. A cell in a table should be an atom so that the cell will render on its own.
See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of MobX
Pros of Redux
  • 26
    It's just stupidly simple, yet so magical
  • 18
    Easier and cleaner than Redux
  • 15
    Fast
  • 13
    Automagic updates
  • 13
    React integration
  • 10
    Computed properties
  • 8
    ES6 observers and obversables
  • 7
    Global stores
  • 3
    Flexible architecture the requeriment
  • 1
    Has own router package (mobx-router)
  • 191
    State is predictable
  • 149
    Plays well with React and others
  • 125
    State stored in a single object tree
  • 78
    Hot reloading out of the box
  • 73
    Allows for time travel
  • 14
    You can log everything
  • 11
    Great tutorial direct from the creator
  • 6
    Endorsed by the creator of Flux
  • 6
    Test without browser
  • 5
    Easy to debug
  • 2
    Enforces one-way data flow
  • 2
    Granular updates
  • 1
    Blabla

Sign up to add or upvote prosMake informed product decisions

Cons of MobX
Cons of Redux
  • 1
    Maturity
  • 12
    Lots of boilerplate
  • 6
    Verbose
  • 5
    Design
  • 4
    Steeper learning curve than RxJs
  • 4
    Steeper learning curve than MobX
  • 4
    Steep learning curve

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is MobX?

MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses.

What is Redux?

It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. t provides a great experience, such as live code editing combined with a time traveling debugger.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention MobX and Redux as a desired skillset
What companies use MobX?
What companies use Redux?
See which teams inside your own company are using MobX or Redux.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with MobX?
What tools integrate with Redux?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

JavaScriptGitHubReact+12
5
4056
Oct 11 2019 at 2:36PM

LogRocket

JavaScriptReactAngularJS+8
5
1911
JavaScriptGitHubNode.js+29
14
13231
GitHubPythonReact+42
49
40494
GitHubPythonNode.js+47
54
71917
What are some alternatives to MobX and Redux?
Relay Framework
Never again communicate with your data store using an imperative API. Simply declare your data requirements using GraphQL and let Relay figure out how and when to fetch your data.
Knockout
It is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), it can help you implement it more simply and maintainably.
GraphQL Cache
A custom middleware for graphql-ruby that handles key construction and cache reads/writes transparently.
Flux
Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code.
Apollo
Build a universal GraphQL API on top of your existing REST APIs, so you can ship new application features fast without waiting on backend changes.
See all alternatives