Files
danandGitHub 2dea98ed31 [test] Run more test suites under cacheComponents flag, again (#96196)
Reverts the revert of #95878.

This failed on `main` due to React bugs
(https://github.com/react/react/pull/37061?) which are fixed now.
2026-07-27 20:54:09 +01:00

24 lines
458 B
TypeScript

import { notFound } from 'next/navigation'
import { Suspense } from 'react'
async function Content({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params
if (slug === '404') {
notFound()
}
return <p id="dynamic">Dynamic page: {slug}</p>
}
export default function DynamicPage({
params,
}: {
params: Promise<{ slug: string }>
}) {
return (
<Suspense>
<Content params={params} />
</Suspense>
)
}