Next.js Discord

Discord Forum

PPR with react query

Unanswered
starlord posted this in #help-forum
Open in Discord
What is the recommended setup to use ppr in ssr pages that uses react-query prefetchQuery option?
For example:
Page A is ssr with prefetchQuery, prefetches a list of items. It has some headings, texts and a client component wrapped in Suspense. This client component takes the list from useSuspenseQuery and uses the items to display them with action buttons.
With ppr do i need know to push down the prefetchQuery close to the client component and wrap it in Suspense?

0 Replies