How to build real-time collaborative app with Convex?
If I use normal mutation it will run the function every time which is not a best practice. I am trying to achieve something like web sockets.
4 Replies
What is this mutation doing? Normally a mutation is the way to go about this, except in cases of very high frequency events like mousemove or on-keydown events when typing
for those specific cases check out https://stack.convex.dev/throttling-requests-by-single-flighting
Throttling Requests by Single-Flighting
For write-heavy applications, use single flighting to dynamically throttle requests. See how we implement this with React hooks for Convex.
Thanks I will check it