Mobx vs Redux

hashcode01

Hash

Posted on March 16, 2022

Mobx vs Redux

As a developer, I want to know the difference between these two state management and pick one of them consciously.

Redux:

  • Redux is heavily influenced by Functional Programming principles
  • It's more popular option
  • Manual approach: it's explicit, you manually dispatch, and you manually subscribe to the store
  • Model:

You dispatch an action
It goes to middleware and then Reducer
It generates a new Store and not mutate it.
componets are subscribed to the store.

  • it's so testable and so predictable

because you literally write everything out yourself

Mobx:

  • MobX is influenced by Object-Oriented Programming and Reactive Programming principles
  • you have a bunch of values that can be defined as an observable
  • observable value: when it updates, everything that depends on it updates as well.
  • Automatic approach: a lot of things happening behind the scenes
  • You mark things as observable and your application starts automatically updating
  • it is still pretty predictable itself

Refs:

💖 💪 🙅 🚩
hashcode01
Hash

Posted on March 16, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Mobx vs Redux
react Mobx vs Redux

March 16, 2022