mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
If we're prerendering an App Shell, then url data is excluded (i.e. we don't advance beyond the `ShellRuntime` stage). however the prospective prerender was still letting params/searchParams resolve, so if those ended up being inputs to a page, they wouldn't be hanging inputs, and we'd get a cache miss for them in the final prerender. closes NAR-883 --------- Co-authored-by: Hendrik Liebau <[email protected]>
19 lines
344 B
TypeScript
19 lines
344 B
TypeScript
export async function generateStaticParams() {
|
|
return [{ slug: 'prerendered' }]
|
|
}
|
|
|
|
export default async function Page({
|
|
params,
|
|
}: {
|
|
params: Promise<{ slug: string }>
|
|
}) {
|
|
'use cache'
|
|
const { slug } = await params
|
|
return (
|
|
<main>
|
|
<h1>Cached page with params</h1>
|
|
<p id="slug">{`Slug: ${slug}`}</p>
|
|
</main>
|
|
)
|
|
}
|