How to get optional parameters in the router?

NEXTjs.

How to implement obtaining all of the parameters of the route, for example in this query
https://www.site.ru/zhenskaja/odezhda/plat-ja?base_color=1461&p=1


Routh dynamic as to obtain all the parameters?

I understand what you need from the server to transfer using req, but the problem with optional parameters, they can be any number

server.get('/products/:category', (req, res) => app.render(req, res, '/catalog', {
 category: req.params.category
 }));
March 23rd 20 at 19:04
1 answer
March 23rd 20 at 19:06
Solution

Find more questions by tags React