The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Use MobX actions to change and guard state

Use MobX actions to change and guard state

3:01
This lesson explains how actions can be used to control and modify the state of your application. They help you to structure your code base and integrate well with the MobX React Devtools. Actions automatically create transactions, which group changes together.
Watch this lesson now
Avatar
egghead.io

This lesson explains how actions can be used to control and modify the state of your application. They help you to structure your code base and integrate well with the MobX React Devtools. Actions automatically create transactions, which group changes together.

Avatar
Anton Telesh

Well, it's all cool. But can you share any articles on how the change detection works underneath? Because now it looks like a magic. And I don't like magic in programming.

Avatar
Michel Weststrate

That question is simple answered, there is no change detection :) Only change notification. For a global idea what MobX reacts to check: https://mobxjs.github.io/mobx/best/react.html. The derivation algorithm is explained here: https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254 and also in my recent ruhrjs talk (not yet published), but slides can be found here: http://magixmobx.surge.sh

In reply to Anton Telesh
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?