Answer the question
In order to leave comments, you need to log in
Why can't I open the page by url?
I set up routing, the url changes, but when I want to enter it, the main page opens and nothing happens. What could be the reason?
<BrowserRouter>
<Link to='/sign_up'>Сlick me</Link>
<Route path='/sign_up' component={Example} />
</ BrowserRouter>
Answer the question
In order to leave comments, you need to log in
<BrowserRouter>
<Link to='/sign_up'>Сlick me</Link>
<Switch>
<Route path='/' exact render={() => <h1>Home</h1>} />
<Route path='/sign_up' component={Example} />
</Switch>
</BrowserRouter>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question