vercel / vercel/next-learn

Partial Pre Rendering is not working on production when using searchParams in a rsc page as props

Open
#595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

hello. when im using searchParams as props like below:

const Page = ({
searchParams,
}: {
searchParams?: { page?:string, order?:string }
}) => {
....

and then use Suspense on the component that actual data fetching is happening inside it, then its not working in production. but when i remove the searchParams and pass the params manually to the fetcher component then it will work

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RSC page pattern described in the issue: a page receiving searchParams, a Suspense boundary, and a nested fetcher component. Compare the production build with the version that passes parameters manually to the fetcher, and establish a minimal reproduction before investigating the partial-prerendering behavior. Done means the same parameter flow works correctly in production.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.