Mobx vs Redux - the winner is obvious
Mobx is impressive alternative to everyone's favorite Redux, but at the end Redux is simply the sane choice we should make. Initially my preferences were for Mobx camp, but once I needed to combine and communicate stores, I found myself forced to write smelly code. That couldn't last for too long.
Mobx Pros
- Better choice than Redux for small project
- Faster development
- Decent community
Convincing black box. Mobx does some hidden things for you, but it is not a bad magic. While I tend be careful with having black boxes in my workflow, Mobx is a black box I would have.
It is one of those frameworks, which even if you ditch at the end, it doesn't leave bad aftertaste. The other one I could mention in this context is Unexpected.
Mobx Cons
- It lacks documentation about how to combine stores. Despite the good will of the community and the author, there is simply no enough documentation to prove that Mobx can be a good fit for large projects.
- It is a step away from functional programming. In moment when functional programming gains momentum, doing something out of terms with it, feels wrong.
- The paradigm it implies, could be perceived as an escape route for people coming to Javascript from other languages. The other library, that fits similar description is Typescript. Funny enough, Mobx is written in Typescript
- Testing could be tricky
- Eslint don't support decorators, yet.
Redux Pros
When I talk about Redux, I am talking about Redux Saga.
- Logic flow to be proud of
- Large community
- Plenty of supporting libraries and boilerplates
- It forces function programming as mind set
- Testable