DEV Community

Hash
Hash

Posted on

4 2

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:

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (3)

Collapse
 
wysrocket profile image
Vlad Kvirenko

Both are equally dead!

Recoil !!!

Collapse
 
hashcode01 profile image
Hash

Recoil is great, I'm a fan of it, but curious if you have tried RTK.

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

There are still better options out there.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay