Urgent.News

What's breaking now, across thousands of outlets.

More in Tech

WebSockets in React Server Components: Client Islands

Why you shouldn’t copy server state into a global store for realtime Hot take: when React Server Components (RSC) are your default, the worst thing you can do for realtime features is turn an entire…

  • Ship pages as Server Components to leverage streaming and small JS budgets.
  • Isolate WebSockets in minimal client islands (5-20 lines) using TanStack Query or SWR.
  • Prefetch initial data server-side and hydrate client cache via TanStack Query’s dehydrate.

More from Saturday 29 August →