Confession time : When React Server Component landed in the Next.js , I was hooked instantly. Being able to perform queries on the database directly from the async component , without client-side fetc

Markdown supported · ⌘↵ to post
There is a lifecycle issue in the sample that would work against the snapshot-plus-delta design: getKey is an inline function in LiveActivityContainer, while the hook includes getKey in its effect dependencies. Each setData update rerenders the component, creates a new function and can close and reopen the socket.
I would give that key extractor a stable identity and add a test asserting that several incoming updates keep one connection open. Otherwise a healthy event stream can produce its own reconnect churn, even after removing every router.refresh call. That is separate from deduplicating the initial snapshot.
Yagya Goel
Full-Stack Developer & DevOps Enthusiast
Awesome breakdown. RSCs definitely felt like a magic bullet at first, but separating out the real-time layer makes total sense. Great read