I’ve got a strange situation where I have a Tracker computation stopping immediately. I’m using this to track upload progress from edgee:slingshot
. uploader.progress()
is reactive.
computation = Tracker.autorun(() => {
console.log('upload progress =', uploader.progress());
this.setState({progress: Math.ceil((uploader.progress() || 0) * 100)});
});
computation.onStop(function () {
console.log('why did we stop?!');
});
The console shows:
upload progress = NaN
FileUpload.jsx:62 why did we stop?!
I don’t understand the conditions under which a computation stops automatically.
EDIT: Oddly enough, even if I make the function totally empty:
computation = Tracker.autorun(() => {});
It still stops immediately.