Open gregberge opened 2 days ago
Latest commit: dc4b7a1cdc6648bf8414f8951fed481929c469b9
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
GitBook Preview Latest commit: https://9d01e95f.gitbook-open.pages.dev PR: https://pr2582.gitbook-open.pages.dev
The latest updates on your projects. Learn more about Argos notifications ↗︎
Build | Status | Details | Updated (UTC) |
---|---|---|---|
default (Inspect) | ⚠️ Changes detected (Review) | 18 changed | Nov 24, 2024, 9:04 PM |
By reading the code, we are already fetching things in
generateMetadata
that is awaited before the first streaming chunk is emitted. So actually the streaming is not active when we load the first page.Giving that, the only issue to solve was to enable streaming when we switch to a page dynamically (from the sidebar). By wrapping page content into
React.Suspense
it's now working.So this PR gives exactly the same result as before but it provides the good status code and redirect code.
Also refactor the code to mutualize things better.
This does not work because Next.js is waiting for
generateMetadata
if there is noloading.tsx
present. The problem is that streaming and instant loading are activated by the same thing:loading.tsx
.I am now trying to use the parallel routing to put a
loading.tsx
only for nav routing.Solve RND-4299