Simple State management using MobX
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.
- Observable State
- Computed Values
- Reactions
- eg. Update React Components
- check understanding what MobX reacts to. - Actions
MobX: Simple and scalable
MobX is one of the least obtrusive libraries you can use for state management. That makes the MobX
approach not just simple, but very scalable as well:
- Using classes and real references