Next.js Discord

Discord Forum

Update query param without reloading page

Unanswered
Himalayan posted this in #help-forum
Open in Discord
HimalayanOP
Hi everyone, I'm trying to update a URL query param without reloading the page using the App Router. Is there a way to do this? Ideally I'd like to have a similar functionality to the shallow option within router.push used in pages router. Thanks 🙂

2 Replies

This isn't possible in the world of RSC/App router since the page server components need to re-render in order to receive the correct searchParams props. This should be an option though if the page is a client component, so they might add shallow routing to the app router at some point for specific use cases, but, I'd imagine it's not a priority. I could be wrong.
HimalayanOP
Ah cool, thanks! I'll keep things as they are for now in that case.