Missing root layout tags error with cache-components static shell opt-out #94742
Unanswered
hpohlmeyer
asked this question in
Help
Replies: 3 comments 3 replies
-
|
In what version of Next.js are you? There was a bug with one of the use cases for that pattern, that got fixed. I wonder if it unintentionally created this problem. For what is worth, there'll be a better, simpler way to do this in the next minor version. |
Beta Was this translation helpful? Give feedback.
3 replies
This comment was marked as low quality.
This comment was marked as low quality.
-
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html>
<body>{children}</body>
</html>
)
}If you need suspense for lazy parts, you can wrap |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In the cache-components docs, the section showing how to opt-out of the static shell shows the following snippet:
If I follow this example, I end up with the Missing Root Layout Tags error. I can fix it by moving the body out-of the suspense boundary, but I am not sure if that changes how the static-shell opt-out works.
I would not expect to see the error at all, because the page should be rendered in a blocking-way, meaning there should never be a partial render without the content of the suspense boudary.
Are the docs wrong here, or is the error wrong, or am I missing something entirely?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions