File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,13 @@ Tracker.autorun(async function example1(computation) {
8787 // Code before the first await will stay reactive.
8888 reactiveVar1 .get (); // This will trigger a rerun.
8989
90- let links = await LinksCollection .findAsync ({}).fetch (); // First async call will stay reactive.
90+ let links = await LinksCollection .find ({}).fetchAsync (); // First async call will stay reactive.
9191
9292 // Code after the first await looses Tracker.currentComputation: no reactivity.
9393 reactiveVar2 .get (); // This won't trigger a rerun.
9494
9595 // You can bring back reactivity with the Tracker.withCompuation wrapper:
96- let users = await Tracker .withComputation (computation, () => Meteor .users .findAsync ({}).fetch ());
96+ let users = await Tracker .withComputation (computation, () => Meteor .users .find ({}).fetchAsync ());
9797
9898 // Code below will again not be reactive, so you will need another Tracker.withComputation.
9999 const value = Tracker .withComputation (computation, () => reactiveVar3 .get ()); // This will trigger a rerun.
You can’t perform that action at this time.
0 commit comments