G
G
Gimir2019-12-16 17:43:38
React
Gimir, 2019-12-16 17:43:38

How to make a custom route in react-router?

Good day, I'm trying to make such a route for react-router:
/seacrh?page=number&repository=someRepository
where :number and :someRepository are parameters, it doesn't work and the component is not rendered in the Route.
Tell me how to make react-router recognize the route and get the parameters from there.
Ps if you do as in the React-Router documentation - "search/:number/:someRepository" - everything works, but I need just such a route.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question