Next.js Discord

Discord Forum

router.refresh() is not working for the client component

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
I'm expecting the client to rerender whent he url query changes, but it doesn't. A manual refresh does update the text. But router.refresh() is not working. Help me out.

https://github.com/aditya-alshi/com-sye/blob/master/app/ui/FromSearch.tsx


Updated:
The useSearchParams is grabbing the updated value, but the defaultValue attribute is not reflecting it? I tried to add it to other elements it does work, just with defaultValue attribute it doesn't.

0 Replies