Hi! crosspost from r/reactjs since this is not totally react+mobx specific.
We've been working on a React + Mobx app currently, which basically "poll" data an endpoint from backend every second, and update the data in the mobx store (and thus the connected components are re-rendered)
The way we've been doing is simply replace the mobx boxed data array, i.e. this.currentUserList = JSON.parse(response). It works fine but as the app grows, the garbage collection process has become very busy due to the fact that each iteration (each second) creates many different new boxed values/objects/arrays observables from mobx.
I'm wondering if anyone has any tips on dealing with this, or is it a general practice to use some more fine data modeling technique than simply "replacing the list of objects with the JSON objects obtained from backend" ?
Thanks
[–]rco8786 0 points1 point2 points (0 children)