T
TanStack10mo ago
round-purple

How to avoid triggering suspense fallback when using ssr prefetch+suspense after first render.

I have a component that uses useSuspenseQuery and the page uses prefetchQuery. The project is a next.js app router app. The client component has buttons that changes the params used in the query. Every change triggers the suspense fallback. Is there anyway to just render the suspense fallback for the initial render?
4 Replies
stormy-gold
stormy-gold10mo ago
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.
From An unknown user
From An unknown user
round-purple
round-purpleOP10mo ago
I found this article
round-purple
round-purpleOP10mo ago
Exploring using Suspense with React Query
Learn how I explored using Suspense with React Query and what issues I encountered and how I solved them.
round-purple
round-purpleOP10mo ago
useTransition solved the problem for me

Did you find this page helpful?