Closed antoninadert closed 7 years ago
You probably need to set ViewModel.Tracker = Tracker;
on the server as well.
so I tried that and no more error from VM, but I still have problems using a collection for SSR. I believe it has to do with meteor's promise system more than Viewmodel at this point, so I close the issue.
I wanted to load some state from a meteor (mongo) collection
sadly I have to differentiate client and server-side with my if condition, because otherwise if I try to return the collection from the server, VM will throw this error (because of tracker):
my-app-path/node_modules/viewmodel-react/dist/tracker.js:434
if (inCompute) throw new Error("Can't flush inside Tracker.autorun")
at Timer.listOnTimeout (timers.js:92:15)