|
I've got nuqs working great to change the state of my data in my form, but now I want some of that state to be displayed in the |
Answered by
franky47
Apr 11, 2025
Replies: 1 comment 1 reply
|
Try setting If you want to update it client-side (so that it shows nicely in the browser), you could do it this way: // Assuming for the example that we want `?title=foo` to show a title of "foo"
const [title] = useQueryState('title')
useEffect(() => {
document.title = title
}, [title]) |
1 reply
Answer selected by
Sparticuz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try setting
shallow: false, asgenerateMetadatais a server-side called function, so you need to do a round-trip to the server. Note that this is kind of dumb (but I don't make the Next.js rules), unless you actually need those search params on the server for SSR.If you want to update it client-side (so that it shows nicely in the browser), you could do it this way: