How to get query params using Server component (next 13)
asked 9 months ago.
0 Answers
5 views
Next13 is out, and they advise to use the new app
directory where every component is by default a "Server Component"
Inside a "server Component", you can use:
async/await
to fetch data.cookies()
to retrieve cookiesheaders()
to retrieve request headers.
But I can't find how to retrieve query params.
Before Next 13, within getServerSideProps
, you could use context.query
to access the query params.
Do you know how to retrieve query params using "server Component" in Next 13.