Meteor 3 compatibility and Find hook behavior
masterIn Meteor 3, hooks behave differently regarding synchronous vs asynchronous methods:
- Find hooks: Only trigger on async cursor methods (e.g.,
fetchAsync(),countAsync()). Synchronous methods likefetch()orcount()do not trigger hooks. - findOne hooks: Only trigger on
findOneAsync(). The synchronousfindOne()method does not trigger hooks. - Constraint:
before.findhooks cannot be async; providing an async function to abefore.findhook will throw an error.