5. • Persist state to a local storage and then boot up from it, out of
the box.
• Pre-fill state on the server, send it to the client in HTML, and boot
up from it, out of the box.
• Serialize user actions and attach them, together with a state
snapshot, to automated bug reports, so that the product
developers can replay them to reproduce the errors.
• Pass action objects over the network to implement collaborative
environments without dramatic changes to how the code is
written.
• Maintain an undo history or implement optimistic mutations
without dramatic changes to how the code is written.
• Travel between the state history in development, and re-evaluate
the current state from the action history when the code changes,
a la TDD.
• Provide full inspection and control capabilities to the development
tooling so that product developers can build custom tools for their
apps.
• Provide alternative UIs while reusing most of the business logic.
Why Redux
6. People often use MobX as alternative for Redux.
Please note that MobX is just a library to solve a
technical problem and not an architecture
MICHEL WESTRATE
M O B X C R E A T O R
7. MobX has no
• Stores
• Data Flow
• Architecture Paradigm
8.
9. • Persist state to a local storage and then boot up from it, out of
the box.
• Pre-fill state on the server, send it to the client in HTML, and boot
up from it, out of the box.
• Serialize user actions and attach them, together with a state
snapshot, to automated bug reports, so that the product
developers can replay them to reproduce the errors.
• Pass action objects over the network to implement collaborative
environments without dramatic changes to how the code is
written.
• Maintain an undo history or implement optimistic mutations
without dramatic changes to how the code is written.
• Travel between the state history in development, and re-evaluate
the current state from the action history when the code changes,
a la TDD.
• Provide full inspection and control capabilities to the development
tooling so that product developers can build custom tools for their
apps.
• Provide alternative UIs while reusing most of the business logic.
Why Redux
10. • Persist state to a local storage and then boot up from it, out of
the box.
• Pre-fill state on the server, send it to the client in HTML, and boot
up from it, out of the box.
• Serialize user actions and attach them, together with a state
snapshot, to automated bug reports, so that the product
developers can replay them to reproduce the errors.
• Pass action objects over the network to implement collaborative
environments without dramatic changes to how the code is
written.
• Maintain an undo history or implement optimistic mutations
without dramatic changes to how the code is written.
• Travel between the state history in development, and re-evaluate
the current state from the action history when the code changes,
a la TDD.
• Provide full inspection and control capabilities to the development
tooling so that product developers can build custom tools for their
apps.
• Provide alternative UIs while reusing most of the business logic.
MobX State Tree
11. Some Facts
15K
stars
G I T H U B
3
latest commit
D AYS A G O
5.0.3
version on npm
L AT E S T
28
on egghead.io
F R E E V I D E O S
33. Shopping Cart Demo
g i t H u b . c o m / 5 0 0 t e c h / m o b x - s h o p p i n g - c a r t
Dynamic Observable
Properties
Provider <=> inject
Normalized State
Store Hierarchy
Auto persist to
localStorage