The fundamental principles behind MobX
Michel Weststrate

Hi, very nice article. I have some questions of how MobX can resolve this situation. In my example app, I have a observable value in my store with a key «fetching» that is true or false when I am fetching data from some API. I have a observer component that is re-rendering when this value change and show a message, loading or loaded. When another key in my store is updated through an action, a new reaction is triggered to log this in the API (make a post) and I would like to modify the state and set true in my key «fetching», and false when the promise finished. You say that automatically updating state is an anti-pattern, derive data instead. What do you mean with that? Thanks!! ( all this is a theoretical situation)

Like what you read? Give Chema Roldán a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.