Hi everybody,
I’m still wrapping my head around subscriptions - or trying to, anyway…
I think I understand how they work if you need to render something to a template. You do a .ready(), and push the collection to the template, that will render docs that are in your (local) collection. Fine
But now: if I understand correctly, when I subscribe to a collection I (might) get a partial dataset. I might not get all of it. So if I do a find(), I might not get an answer, but I might need to wait for it, presumably with some callback mechanism. Fine. But I cannot find any example for this. All examples seem to focus on rendering too the template. But what if I do not want to do that? What if I need a item from the db (from a large, thus presumably not fully loaded?) table. I want to use that item for a calculation. And I do not care if it takes 0.1 second to load from the server, but I do need that item. How to go about this? I cannot tell from the documentation how to do that…
Other than, maybe, use a reactiveVar, and look for the onchange in that var, or something like that. But that does feel… convulted
Probably I missed something in some document - please point me in the right direction?
Paul