Files
Andrew ClarkandGitHub 3ff99bd0e8 Re-implement hmr-refresh in terms of refresh (#87135)
Based on:
- #87134 

---

hmr-refresh-reducer is identical to refresh-reducer except for the fact
that it doesn't evict the prefetch cache. So this refactors both
implementations to call the same shared function.
2025-12-15 18:27:14 -05:00

31 lines
734 B
TypeScript

import { connection } from 'next/server'
import { Suspense } from 'react'
export async function generateStaticParams() {
return [{ param: 'a' }, { param: 'b' }]
}
async function DynamicContent({ children }: { children: React.ReactNode }) {
await connection()
return children
}
export default async function Page({
params,
}: PageProps<'/mismatching-prefetch/dynamic-page/[param]'>) {
const { param } = await params
return (
<Suspense
fallback={
<div id={`dynamic-page-loading-${param}`}>{`Loading ${param}...`}</div>
}
>
<DynamicContent>
<div
id={`dynamic-page-content-${param}`}
>{`Dynamic page ${param}`}</div>
</DynamicContent>
</Suspense>
)
}