Closed JacobKGilbert closed 2 months ago
Good catch, but not the best solution. Using estimatedDocumentCount
is probably the best.
https://docs.meteor.com/api/collections.html#Mongo-Collection-estimatedDocumentCount
Thank you @StorytellerCZ, I used countAsync due to the error given on the server. "error on boot.js Error: count() is not avaible on the server. Please use countAsync() instead."
I tried your approach and it worked as well to get rid of this error. We might need to see that the tutorial be updated with your option, as it is cleaner.
This is now updated in the V3 tutorial https://docs.meteor.com/tutorials/react/
When following the tutorial I ran into an issue where the app kept crashing after completing this step. The fix for this was changing "count()" to "countAsync()"