Skip to content

Commit 46dd3d4

Browse files
authored
Merge pull request meteor#13602 from meteor/docs/fix-typo-in-tracker
DOCS: Fix typo in Tracker.md
2 parents f6b6ae8 + 8ea36ea commit 46dd3d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v3-docs/docs/api/Tracker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)