nuqs
nuqs copied to clipboard
Can't change `as` and `href` parameter
First of all, thanks for this great hook. I was looking for somthing to handle query params and this is an almost perfect elegant solution !
Sadly, we had an issue that forced us to stop using it: in our application, we had to use the rewrite functionnality to handle subdomains and ISR (as per this comment). Since useQueryState doesnt't allow setting as
parameter, it doesnt work in preview / production where we use the subdomains.
Maybe we could give a path option to the hook instead of using router.pathname
?
Thanks for your feedback!
Maybe we could give a path option to the hook instead of using router.pathname ?
Do you have an example of this suggested API ?
Is there an update on this request I am having the same issue.
Any update on this issue?
The newer versions of nuqs
reuse the asPath
present in the pages router internals, so this should be fixed.
Closing for now as the internals have changed a lot since this issue was open, feel free to reopen/comment if still relevant.