It's all about time: Building a performant Stopwatch with MobX and React - fast
-
In recent posts we spoke a lot about developing React applications with Redux: It enables the users to easily make testable and structured applications. However, writing a Redux application produces a lot of boilerplate code. One framework alternative is MobX, which solves this problem by doing automation using observables.
Click here to see the original article
-
I think you do not need to make timer variable in TimerStore class as observable. Could you please check?
-
@PetrMyazin said:
I think you do not need to make timer variable in TimerStore class as observable. Could you please check?
reply
Yes, you are correct, the fact that the inner variables are observable is enough.
-
I refactored it to break up the components with the Provider HoC.
https://gist.github.com/wordyallen/fbd9e239656cb6232fc3bfbcfb987522#file-stop_watch_component-js