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

Sync the UI with the app state using MobX observable and observer in React

Sync the UI with the app state using MobX observable and observer in React

2:31
Applications are driven by state. Many things, like the user interface, should always be consistent with that state. [MobX](https://mobxjs.github.io/mobx) is a general purpose FRP library that provides the means to derive, for example, a React based user interface automatically from the state and keep it synchronized. The net result of this approach is that writing applications becomes really straight-forward and boilerplate free.
Watch this lesson now
Avatar
egghead.io

Applications are driven by state. Many things, like the user interface, should always be consistent with that state.
MobX is a general purpose FRP library that provides the means to derive, for example, a React based user interface automatically from the state and keep it synchronized.

The net result of this approach is that writing applications becomes really straight-forward and boilerplate free.

Avatar
Kumar Pratik

I copied the same example, action is being called and it is logging fine but the React component isn't getting re-rendered. Any hint?

In reply to egghead.io
Avatar
Christian Sakai

Hello, same thing happened here.

In reply to Kumar Pratik
Avatar
Michel Weststrate

The JSBin on this page it works fine for me, and when cloning it as well. Could you share your clone? Specific browser maybe?

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