Skip to content
asyncwaiter
PostsSeriesTagsAbout
KO

Tweaks

theme
accent palette
film grain
minimal mode
02 POSTS

Page 1

  • #react#state-management#tanstack-query

    Is React Query's staleTime: 0 really 0?

    I prefetched the data and hydrated it, and 30 runs in dev mode still logged 60 requests. The conclusion from my last post, that staleTime 0 was the cause, was wrong. React Query raises staleTime to a 1,000ms floor in Suspense, and that number exists because React throttles reveals by 300ms after the fallback commit. In my experiment, content was revealed at 308ms, 608ms and 908ms.

    2026-10-03·9 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