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.