searchParams
on the Page context vs useSearchParams
#58351
Replies: 4 comments 7 replies
-
searchParams is not available on static generation. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@devjiwonchoi searchParams from page props will trigger dynamic (server-side, request time) rendering. You can't have server-side static rendering and searchParams without client-side rendering (you can have static + client-side though) because they are not part of "generateStaticParams", sadly. |
Beta Was this translation helpful? Give feedback.
-
I'm curious if any of the above answers have changed with Next.js 15 and the necessity to invoke |
Beta Was this translation helpful? Give feedback.
-
IMO the
searchParams
that is being passed down to the Page component as the context is a successor to theuseSearchParams
hook.What would be the use cases that
useSearchParams
are preferred over the contextsearchParams
?Reference
searchParams
useSearchparams
Beta Was this translation helpful? Give feedback.
All reactions