Skip to content

Commit

Permalink
call use on lazyData
Browse files Browse the repository at this point in the history
  • Loading branch information
ztanner committed Jan 7, 2025
1 parent 5caecd9 commit cbf30f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/next/src/client/components/layout-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ function InnerLayoutRouter({

return serverResponse
})

// Suspend while waiting for lazyData to resolve
use(lazyData)
}
// Suspend infinitely as `changeByServerResponse` will cause a different part of the tree to be rendered.
// A falsey `resolvedRsc` indicates missing data -- we should not commit that branch, and we need to wait for the data to arrive.
Expand Down

0 comments on commit cbf30f5

Please sign in to comment.