useSuspense only on inital load, to allow incremental update #9395
-
1I have case where I have a main content and paginated sidebar. Both areas I am feeding with data using 2On initial load I have Suspense wrapper so the loading state looks like this: 3The problem I have is updating page on sidebar. After I update a page parameter I am running into loading screen from step QuestionHow to run useQuerySuspense only in suspense mode on initial load, but later update query parameter without triggering whole page loader? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think you’d want to conditionally add another suspense boundary around |
Beta Was this translation helpful? Give feedback.
I think you’d want to conditionally add another suspense boundary around
sidebar
, depending on if you havemain
data already or not. As suspense bubbles up to the nearest boundary, it would prevent the boundary that wraps the whole page from showing.