You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both useSuspenseInfiniteQuery and useInfiniteQuery + experimental_prefetchInRender use the error boundary for the first page, but only the latter uses the error boundary for subsequent pages.
useSuspenseInfiniteQuery (doesn't use error boundary):
Describe the bug
Both
useSuspenseInfiniteQueryanduseInfiniteQuery+experimental_prefetchInRenderuse the error boundary for the first page, but only the latter uses the error boundary for subsequent pages.useSuspenseInfiniteQuery(doesn't use error boundary):Screen.Recording.2025-12-02.at.16.17.58.mov
useInfiniteQuery+experimental_prefetchInRender(uses error boundary):Screen.Recording.2025-12-02.at.16.17.28.mov
Is this intentional? It was really surprising to me. I would expect both of these hooks to behave the same.
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-query-qags2jzf?file=src%2Fcomponents%2FProjects.tsx&preset=node
Steps to reproduce
Switch between the two examples to observe the behaviour difference:
Expected behavior
I would expect both of these hooks to behave the same.
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
N/A
Tanstack Query adapter
None
TanStack Query version
5.90.11
TypeScript version
No response
Additional context
No response