Stepan
TTCTheo's Typesafe Cult
•Created by Deimos on 1/18/2024 in #questions
Nextjs 14 App Router fetch data as the searchParams change
the way I did it in one of my apps was using router.push
for your page using params make sure you're taking searchParams from the page props like this:
and in your client component:
not sure if this is the correct way to work with searchParams in app router but it worked fine for me
3 replies