The problem – testing Meteor Methods and Publications is not
friendly. Here are some ways to do it.
Hardcode values – You have to deactivate middlewares for testing as
DDP Tools – Install third-party programs
"Back-end developers should be able to test their endpoints without
having to use the front-end or writing scripts"
Subscribe to publications and see updates in real time
Document your endpoints with Markdown
Future (basically what Postman does)
Cloud service - saving collections
Shared Workspaces with team
TODO: Recorded demo should be posted
New React Hooks for Meteor
Maintainer of useTracker
Why? Tighter integration than just useTracker.
Collection queries for massive lists - if one changes, whole list
re-renders (or at least reconcile). References stay stable (useful for
useFind and useSubscribe
useFind – single cursor from factory method
Plays nice with React logic.
why is isLoading method? To setup reactivity only when needed loading
Use cases: Chats, big tables.
Many small components - optimised for concurrent mode.
skipUpdate - compare results by yourself. Beware: fast-deep-equals can be actually slower than React
reconciliation. You are basically skipping React optimization.
Useful when your backend provide update timestamp.
just simple convenience wrappers
requires globally unique id, unlike useState
Option to opt-out
findOne - use useTracker(), internally just .fetch(), so no special
hook necessary. Don't use useFind as it creates cursor.
Diff between useSubscribe and subscribing in useTracker
skipUpdate can be useful to filter out updates that come from properties
to which you haven't subscribed. It's a quirk of tracker that any
property update will cause a reaction, even if that property is filtered
out in the query itself!