Next.js Discord

Discord Forum

How to use multiple params in url?

Answered
Ccorgz posted this in #help-forum
Open in Discord
Avatar
CcorgzOP
I have the structure as the image attached, and I use the [search] param in it. Bu I need more variables in that same route, like using '?page=2' for example.
So, how should I pass the params and how should I to receive them?
Thanks already for any help.
Image
Answered by joulev
Use search params then, see the searchParams prop of Page components and useSearchParams
View full answer

2 Replies

Avatar
joulev
Use search params then, see the searchParams prop of Page components and useSearchParams
Answer
Avatar
CcorgzOP
Thank u very much, that did solved my problem.