mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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.] ```
26 lines
417 B
TypeScript
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>
|
|
}
|