Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
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