How to get optional parameters in the router?


How to implement obtaining all of the parameters of the route, for example in this query

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

Find more questions by tags React