T
TanStack13mo ago
robust-apricot

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
sensitive-blue
sensitive-blue13mo ago
are the params part of the queryKey ?
robust-apricot
robust-apricotOP13mo ago
yes

Did you find this page helpful?