GFE Architecture Offsite 2018
What is MobX
MobX is a simple, scalable and battle tested state management library transparently applying functional reactive programming.
The core design principle:
Anything that can be derived from the application state, should be derived. Automatically.
React and MobX are a powerful combination
State
Actions
Derivations
Computed values
Reactions
MobX distinguishes two kind of derivations:
Characteristics:
A minimal, consistent set of subscriptions can only be achieved if subscriptions are determined at run-time.
MobX supports a uni-directional data flow:
@observer decorator/function
Provider component
@inject decorator/function
The mobx-react package provides: