next.js
df1a427e - refactor <AppRouter /> structure (#64594)

Commit
1 year ago
refactor <AppRouter /> structure (#64594) Continuation of https://github.com/vercel/next.js/pull/59606 Previous PR description, for posterity: > The current composition of RSC and client layers is a little awkward. In particular the AppRouter component is a client component but it is rendered by RSC which makes the intial data load format for RSC different than what you would get on a navigation. This change moves around some implementations to lift AppRouter out of the RSC tree and make it render as part of the Client entrypoint directly. Additionally, this PR unlocks some future optimization work, such as re-using the SSR stream for generating FlightData & ensuring preloads are properly captured during `generateFlight`. Fixes #53274 As as we'll no longer be serializing `initialCanonicalUrl` in favor of a shortened variable
Author
Parents
Loading