Skip to content
asyncwaiter
PostsSeriesTagsAbout
KO

Tweaks

theme
accent palette
film grain
minimal mode
03 POSTS

React 1

  • ◆ Rendering Boundaries · Part 2
    #react#nextjs#debugging

    Rendering Boundaries[2]: typeof window does not know the graph

    Once SSR came back to life, a new error surfaced: getLocale is not supported in Client Components. A typeof window check only tells you server or browser; it does not know whether the code is in the rsc bundle or the ssr bundle. I followed the Turbopack source to see how it splits the rsc, ssr, and client graphs, ran an experiment to confirm that libraries only offer choices through exports conditions, and ended up drawing the boundary at build time with server-only.

    2026-10-20·Updated 2026-10-27·27 min read
  • #react#state-management#tanstack-query

    Is React Query's staleTime: 0 really 0? And why?

    I prefetched the data and even hydrated it, and queryFn was still called twice. In the last post I explained that as staleTime being 0, and the explanation was not right. In Suspense mode staleTime is clamped to a minimum of 1,000ms. I followed React Query and React internals to find out why that floor is needed, where the gap is measured, and what pushed my experiment past one second. The key was that a suspended render leaves nothing behind. And even with the same code, the time that passes changes with the environment it runs in.

    2026-10-03·Updated 2026-10-12·25 min read
  • ◆ Rendering Boundaries · Part 1
    #react#nextjs#debugging

    Rendering Boundaries[1]: Server Functions cannot be called during initial render

    I traced an error that was piling up in DataDog at about 3,000 a week. The cause was that useSuspenseQuery runs queryFn during render, before commit, and a Server Function was sitting inside it. Instead of the advice to switch to useQuery, I pulled the read function out of the use server file and the error went to zero. But when I measured 30 runs in the same sandbox, the requests came back as 60. The server and the browser have different queryClients.

    2026-10-01·15 min read
mailMail icongithub
asyncwaiter
•
© 2026
•
https://asyncwaiter.com