S
S
Swaer2020-03-06 21:40:08
React
Swaer, 2020-03-06 21:40:08

How to render a component depending on the address bar?

There are 3 components, 2 are static, and the 3rd one changes depending on the address bar, how to do this? how it will be necessary to change the address of a line from static components? Using just Link and that's it?
For example, in the 1st component of the button, they change the address bar and because of this, the 3rd component is redrawn, the products are in it and they are sorted using the values ​​​​from the address bar

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
McBernar, 2020-03-06
@McBernar

React Router.
Through switch, render components by url.

R
Robur, 2020-03-07
@Robur

https://reacttraining.com/react-router/web/example...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question