Next.js Discord

Discord Forum

Using app router, how to read query params on server

Answered
Gouty oak gall posted this in #help-forum
Open in Discord
Gouty oak gallOP
Inside of a page.tsx what is best way to read a query param (e.g. ?field=val) to pass it to a component? All the docs show useSearchParams but that is clientside isn't it?

4 Replies