Need advice about which tool to choose?Ask the StackShare community!
MobX vs Relay: What are the differences?
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; Relay: A JavaScript Framework for Building Data-Driven React Applications, by Facebook. 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.
MobX belongs to "State Management Library" category of the tech stack, while Relay can be primarily classified under "Javascript UI Libraries".
MobX and Relay are both open source tools. It seems that MobX with 19.6K GitHub stars and 1.21K forks on GitHub has more adoption than Relay with 13K GitHub stars and 1.28K GitHub forks.
According to the StackShare community, MobX has a broader approval, being mentioned in 51 company stacks & 32 developers stacks; compared to Relay, which is listed in 39 company stacks and 7 developer stacks.
Pros of MobX
- It's just stupidly simple, yet so magical26
- Easier and cleaner than Redux18
- Fast15
- Automagic updates13
- React integration13
- Computed properties10
- ES6 observers and obversables8
- Global stores7
- Flexible architecture the requeriment3
- Has own router package (mobx-router)1
Cons of MobX
- Maturity1