Redux vs. MobX notes
Last active
January 12, 2019 19:30
-
-
Save hew/931c45ff5d9d3e9b4901d04de72a28ef to your computer and use it in GitHub Desktop.
Redux vs. MobX
Abstract: Observables are a powerful new data type
Demo: Click Here
Pros
- Write less code; do more.
- MobX is FAST. (Author explanation), (benchmarks)
- The speed kind of just works out of the box.
- Small API that is easy to learn
- Can actually replace React's state system as MobX is faster a lot of the time.
Cons
- Developer cost of learning a new technology
- Observables/decorators, today, are transpiled ES7
- Decorators are kind of automagical in that a lot of the complexity is hidden from the developer.
Abstract: Stateless functions. That's it.
demo: Click Here
Pros
- Just plain Javascript
- Crazy successful adoption and the backing of (and subsequent author hire by) Facebook means huge developer ecosystem with lots of plugins/forks/etc
- Easy to test
Cons
- Lots of boilerplate code just to get going
- Verbose code just overall - and in many different places
- While easier to test, hard(er) to reason about (imo)
- CAN be more-or-less just as fast as MobX, but getting to that speed takes some doin and moderate knowledge. (link)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment