Blog

Is it right to say MobX has overshadowed Redux

#React#MobX#Redux#StateManagement

Mobx and Redux both are used to manage state in JavaScript applications. So, Is it a valid argument that MobX is offering some values that were not available in Redux and has overshadowed Redux, the same way that unidirectional data flow killed two-way data binding or how React with declarative programming killed the traditional MVC/MVVM design patterns. As MobX might be easier to learn as a beginner. Numerous developers may choose MobX if they are about to start a new project from scratch which is an advantage for MobX, having said that it could not be the case for a very long duration as we know how fast paced this industry is! Both integrate well with the philosophy of React  and the best part is we have  the privilege to change to another state management solution from MobX to Redux and Redux to MobX. In Mobx your state is mutable. On the other hand, in Redux you keep all your state in one global store or one global state.

 

MobX is infact simple to use, it has a short learning curve and has a quick start. MobX is best suitable for lightweighjt applications and can be used in bigger size projects too, when dealing with explicit constraints. MobX uses multiple stores and is less boilerplate. In case of Redux , it uses a single store over multiple stores to save state. Redux is influenced by functional programming (FP) principles and uses pure functions. In Redux, state is normalized like in a database. In contrast, MobX  is influenced by object-oriented programming, but also by reactive programming. And MobX uses multiple stores. In MobX there is way less code, and way faster development process. In contrast to Redux making one change can mean writing code in four files.

 

So, even there are so many advantages of MobX, it is hard to say that Mobx is a good choice over Redux. As big projects and big teams still need Redux .

 

 

 

 

 

Share This :

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.