Files
Jude GaoandGitHub 7cc0ed1fba Fix: Resolve <Head> PPR resume mismatch by search params (#82587)
The `key` prop on `<Head>` component differs during prerender and a PPR
resume because of search params being part of the key, causing the
resume to treat them as distinct components, hence the error\*. However,
it is necessary semantically to include search params in the key for
`<Head>`, so we will remove the search params from the key during the
resume SSR.

\*Mismatch Error:
```
 тип [Error: Couldn't find all resumable slots by key/index during replaying.
The tree doesn't match so React will fallback to client rendering.]
```
2025-08-12 20:51:34 -04:00

26 lines
417 B
TypeScript

import { connection } from 'next/server'
import { Suspense } from 'react'
export default function Page() {
return (
<p>
hello world
<Suspense>
<DynamicHole />
</Suspense>
</p>
)
}
export const generateMetadata = async () => {
await connection()
return {
title: `Hello World`,
}
}
const DynamicHole = async () => {
await connection()
return <p>Dynamic Hole</p>
}