revalidatePath on a page with query params
Unanswered
Western thatching ant posted this in #help-forum
Western thatching antOP
Hmmm can't seem to find anything about reval path on docs and just simply passing the whole url with the query params to revalidatePath doesn't seem to do the trick 😦
4 Replies
Query params will opt out the cache by default so you won't need revalidatePath if I am not wrong
or did I misunderstood your problem?
African Slender-snouted Crocodile
Are you using something like [generateStaticParams](https://nextjs.org/docs/app/api-reference/functions/generate-static-params) to make it require revalidation? What are you seeing that doesn't match your expectations?
Western thatching antOP
Actually,
its more like:
- In a normal page as a server comp.
- This page receives the searchParams and fetchs data using the searchParams.
- Client componer in same page, has some updates via server actions.
In a normal scenario, client comp server action would just need to call revalidatePath on that page and it would update the data.
However with query params on the server component page, it doesn't seem to revalidateIt
its more like:
- In a normal page as a server comp.
- This page receives the searchParams and fetchs data using the searchParams.
- Client componer in same page, has some updates via server actions.
In a normal scenario, client comp server action would just need to call revalidatePath on that page and it would update the data.
However with query params on the server component page, it doesn't seem to revalidateIt