Describe the bug
When using nuqs along side tanstack router/start to manage table state, attempting to update a sorting state results in runtime error Failed to construct 'URLSearchParams': Cannot convert object to primitive value. This appears to be serialization mismatch.
How to reproduce
How to reproduce
- Repo
- Setup a project with
@tanstack/start and nuqs
- Define a search paramater using
getSortingStateParser()
- Attempt to update the sort state
- Observe the console error when the router attempts to sync the state to the URL
Link to reproduction
https://github.com/epenflow/sorting
Additional information
Expected behavior
The sorting state should serialized into a query string and successfully synchronized with the URL via tanstack router
Actual behavior
The application crashes with the following error
Failed to construct 'URLSearchParams': Cannot convert object to primitive value
Describe the bug
When using nuqs along side tanstack router/start to manage table state, attempting to update a sorting state results in runtime error
Failed to construct 'URLSearchParams': Cannot convert object to primitive value. This appears to be serialization mismatch.How to reproduce
How to reproduce
@tanstack/startandnuqsgetSortingStateParser()Link to reproduction
https://github.com/epenflow/sorting
Additional information
Expected behavior
The sorting state should serialized into a query string and successfully synchronized with the URL via tanstack router
Actual behavior
The application crashes with the following error
Failed to construct 'URLSearchParams': Cannot convert object to primitive value