T
TanStack10mo ago
fair-rose

useSuspenseQuery with react-router

In react router does useSuspenseQuery trigger the suspense boundary after first render? I fetch the data in the loader using ensureQueryData without await. They query uses route params. It works as expected, except when the params change the suspense boundary isn't triggered.
2 Replies
deep-jade
deep-jade10mo ago
are the params part of the queryKey ?
fair-rose
fair-roseOP10mo ago
yes

Did you find this page helpful?