上QQ阅读APP看书,第一时间看更新
Observables, Actions, and Reactions
Describing the structure of the client state is the first step in UI development. With MobX, you do this by creating your tree of observables. As the user interacts with the app, actions are invoked on your observable state, which in turn can cause reactions (aka side-effects). Continuing from Chapter 1, Introduction to State Management, we will now take a deeper look at the core concepts of MobX.
The topics covered in this chapter include:
- Creating the various kinds of observables
- Setting up the actions that mutate the observables
- Using reactions to handle external changes