@faceyspacey or anyone who knows =)
I’ve been looking at tracker-react (pretty slick btw) and there’s one thing I don’t get. Why wrap the autorun in a Tracker.nonreactive(() => {
?
context[name] = Tracker.nonreactive(() => { //NOTE: we may want to run this code in `setTimeout(func, 0)` so it doesn't impact the rendering phase at all
return Tracker.autorun(c => {
if(c.firstRun) data = dataFunc.call(context);
else {
if(context[name]) context[name].stop(); //stop autorun here so rendering "phase" doesn't have extra work of also stopping autoruns; likely not too important though.
updateFunc.call(context); //where `forceUpdate` will be called in above implementation
}
});
});