Simple State management using MobX

Pulkit Aggarwal
Simple JS
Published in
1 min readJul 13, 2018

MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). The philosophy behind MobX is very simple:

Anything that can be derived from the application state, should be derived. Automatically.

which includes the UI, data serialization, server communication, etc.

`Half the code, twice the fun` is how people describe MobX

Core concepts

MobX has only a few core concepts which are inter-related with each other.

  1. Observable State
  2. Computed Values
  3. Reactions
    - eg. Update React Components
    - check understanding what MobX reacts to.
  4. Actions

MobX: Simple and scalable

MobX is one of the least obtrusive libraries you can use for state management. That makes the MobXapproach not just simple, but very scalable as well:

  1. Using classes and real references

--

--