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.
Uh oh!
There was an error while loading. Please reload this page.
-
IMO the
searchParamsthat is being passed down to the Page component as the context is a successor to theuseSearchParamshook.What would be the use cases that
useSearchParamsare preferred over the contextsearchParams?Reference
searchParamsuseSearchparamsBeta Was this translation helpful? Give feedback.
All reactions