Skip to content

processUrlSearchParams callback not called with method: 'debounce' #1249

@joschka-w

Description

@joschka-w

Context

What's your version of nuqs?

"nuqs": "^2.8.2",

What framework are you using?

  • ✅ Next.js (app router)
  • ❌ Next.js (pages router)
  • ✅ React SPA (no router)
  • ❌ Remix
  • ❌ React Router
  • ❌ Other (please specify)

Which version of your framework are you using?

next: 16.0.7,
react: 19.0.0,
react-dom: 19.0.0

Description

There's an issue with the processUrlSearchParams callback when using the debounce update method on the NuqsAdapter.

When method: 'debounce' is set, the processUrlSearchParams callback is not executed. The callback works correctly with method: 'throttle'.

This issue occurs in both next.js 16.0.7 (app router) and react SPA environments.

Reproduction

Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/p/sandbox/nuqs-testing-pt7hp8
  2. Click the "Update query state" button to trigger a state update
  3. The processUrlSearchParams callback in index.js does not fire
  4. Change the method in limitUrlUpdates from 'debounce' to 'throttle' by clicking the other button
  5. The processUrlSearchParams callback should execute correctly now

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeature/time-safetyThrottle, debounce, anything related to keeping URL updates time-safe.released

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions