Skip to content

fix: preserve parsed value identity across hooks - #1549

Closed
franky47 wants to merge 22 commits into
ref/single-storefrom
repro/issue-1531-pr1482
Closed

franky47 wants to merge 22 commits into
ref/single-storefrom
repro/issue-1531-pr1482

Conversation

@franky47

@franky47 franky47 commented Aug 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • preserve parsed object identity when query state is shared across hooks or remounted
  • support equivalent parser factories created during render without redundant updates
  • avoid extra render-count and cross-route reconciliation commits
  • keep the client, minimal, and server bundles within their configured limits

Stacked on #1482; review only the five commits on top of ref/single-store.

@vercel

vercel Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nuqs Ready Ready Preview Sep 3, 2026 11:11am UTC

@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: aa7e7155-7200-42cb-bfd6-b53d81967a2a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/nuqs@1549

commit: 38fc3e4

@franky47 franky47 added this to the 🪵 Backlog milestone Aug 15, 2026
@franky47 franky47 added bug Something isn't working feature/useQueryStates AI slop PR generated by AI, needs some cleanup before merging labels Aug 15, 2026
@github-actions

github-actions Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

Bundle size

Base PR Δ
✅ Client 5.97 kB 5.90 kB ⬇️ -71 B
✅ Client (minimal tree-shaken) 4.41 kB 4.16 kB ⬇️ -262 B
✅ Server 3.64 kB 3.43 kB ⬇️ -221 B

Brotli-compressed. Limits are set in the size-limit config in packages/nuqs/package.json.

Gjdoalfnrxu and others added 12 commits September 3, 2026 00:06
parseAsIsoDateTime returns a new Date object on every render, even when
neither the query string nor the instant it encodes has changed. The
existing referential-equality suite covers default values and
parseAsJson objects but not a value parsed from the URL, so this gap is
untested.

Three failing cases, in the existing describe block:

- a Date read from an unchanged URL loses referential equality across
  re-renders of a single mounted hook
- the same across remounts
- the consequence: a remounted subscriber that reports its parsed value
  upward re-keys itself indefinitely (53 renders and climbing, with no
  writes to the URL and no change of value)

Measured with parseAsIsoDateTime, which ships eq: compareDates, so the
parser's own equality function is not consulted on this path.
@franky47 franky47 removed this from the 🪵 Backlog milestone Sep 3, 2026
@franky47 franky47 added the 🧟 zombieland Closed PRs to be reopened later label Sep 17, 2026
@franky47 franky47 closed this Sep 17, 2026

This branch was successfully deployed

1 active deployment
Preview — 38fc3e46 Deployed Sep 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI slop PR generated by AI, needs some cleanup before merging bug Something isn't working feature/useQueryStates 🧟 zombieland Closed PRs to be reopened later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants