nextjs - 💡(How to fix) Fix multi→single search-param unset does not commit RSC [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#93104Fetched 2026-04-22 07:42:52
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
issue_type_added ×1labeled ×1

Code Example

pnpm install
pnpm dev            # starts on :3100
# in another shell:
pnpm exec playwright install chromium
pnpm exec playwright test

---

Server  [server] f.status = [] count = 0
toggles.tsx:20 [client] props.count = 0 props.values = [] url.values = []
installHook.js:1 [client] props.count = 0 props.values = [] url.values = []
host-console-events.js:1 [client] props.count = 0 props.values = [] url.values = []
host-console-events.js:1 [client] props.count = 0 props.values = [] url.values = []
host-console-events.js:1  Server  [server] f.status = ["A"] count = 1
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1  Server  [server] f.status = ["A","B"] count = 2
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["B"]
host-console-events.js:1  Server  [server] f.status = ["B"] count = 1

---

[client] props.count = 1 props.values = ["B"] url.values = ["B"]
host-console-events.js:1 [client] props.count = 1 props.values = ["B"] url.values = ["B"]

---

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:53:31 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T8122
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.29.2
Relevant Packages:
  next: 16.2.4 // Latest available version is detected (16.2.4).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/dave-wwg/next-multi-value-searchparam-repro

To Reproduce

I've generated a test suite which demonstrates this bug; it passing means that the bug exists!

pnpm install
pnpm dev            # starts on :3100
# in another shell:
pnpm exec playwright install chromium
pnpm exec playwright test

You can also re-produce manually by:

  1. loading localhost:3100
  2. toggling each of the 2 filters on, incrementing the count by 1 each time
  3. toggling one of the filters off, which does not decrement the count as expected

Current vs. Expected behavior

Current

When router.replace(url, { scroll: false }) changes a repeated search-param from multiple values (?k=A&k=B) to a single value (?k=B), the new RSC payload is fetched and the server renders with the correct searchParams, but the client tree never commits the update. The server-rendered JSX and the client component's server-passed props stay stale. Other transitions on the same param (empty→single, single→multi) commit correctly — only multi→single is broken. It also seems to work if the toggle is done a second time?

here are the logs pulled from my browser console.

Server  [server] f.status = [] count = 0
toggles.tsx:20 [client] props.count = 0 props.values = [] url.values = []
installHook.js:1 [client] props.count = 0 props.values = [] url.values = []
host-console-events.js:1 [client] props.count = 0 props.values = [] url.values = []
host-console-events.js:1 [client] props.count = 0 props.values = [] url.values = []
host-console-events.js:1  Server  [server] f.status = ["A"] count = 1
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1 [client] props.count = 1 props.values = ["A"] url.values = ["A"]
host-console-events.js:1  Server  [server] f.status = ["A","B"] count = 2
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["A","B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["B"]
host-console-events.js:1 [client] props.count = 2 props.values = ["A","B"] url.values = ["B"]
host-console-events.js:1  Server  [server] f.status = ["B"] count = 1

they are missing the client logs which should say:

[client] props.count = 1 props.values = ["B"] url.values = ["B"]
host-console-events.js:1 [client] props.count = 1 props.values = ["B"] url.values = ["B"]

Expected

The client tree always responds to data updates

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:53:31 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T8122
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.29.2
Relevant Packages:
  next: 16.2.4 // Latest available version is detected (16.2.4).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

React

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local)

Additional context

full disclosure, this re-production was generated by Claude Code! But spun out of a real bug i found in my code. I took a look at the minimal re-pro and it seems like it should be working

extent analysis

TL;DR

The issue can be resolved by ensuring that the client tree is updated correctly when the search parameters change from multiple values to a single value.

Guidance

  • Verify that the router.replace method is correctly updating the URL and that the new search parameters are being passed to the client component.
  • Check the implementation of the getServerSideProps method to ensure that it is correctly handling the updated search parameters and returning the expected props to the client component.
  • Investigate the possibility of a caching issue, where the client component is not updating because it is using a cached version of the props.
  • Review the logs to ensure that the expected client logs are present and that the client component is receiving the updated props.

Example

No code example is provided as the issue is related to a specific implementation and requires further investigation.

Notes

The issue seems to be related to the way Next.js handles search parameters and updates the client component. Further investigation is required to determine the root cause of the issue.

Recommendation

Apply a workaround to ensure that the client tree is updated correctly when the search parameters change. This may involve manually updating the client component's props or using a different approach to handle search parameter changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix multi→single search-param unset does not commit RSC [1 participants]