mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Suspense around body will trigger "missing tags" warning if something throws in the boundary. This error can come in slightly later and cause flaky test results.
Fixes
```
● Validations for <Link legacyBehavior> › When rendering from a Client Component › warns and throws an error if the child is lazy JSX
expect(received).toMatchInlineSnapshot(snapshot)
Snapshot name: `Validations for <Link legacyBehavior> When rendering from a Client Component warns and throws an error if the child is lazy JSX 1`
```
-- https://github.com/vercel/next.js/actions/runs/19097617827/job/54561506584#step:34:13256
25 lines
435 B
TypeScript
25 lines
435 B
TypeScript
import { connection } from 'next/server'
|
|
import { ReactNode, Suspense } from 'react'
|
|
|
|
export default async function Root({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
<Suspense>
|
|
<Connection>{children}</Connection>
|
|
</Suspense>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|
|
|
|
async function Connection({ children }: { children: ReactNode }) {
|
|
await connection()
|
|
|
|
return children
|
|
}
|