My React app has a folder structure like this:
- src -- pages --- Home.js --- Contact.js --- project1 ---- About.js With React Router I can navigate to Home.js and Contact.js easily like this:
<Router> <Switch> <Route path='/'> <Home /> </Route> <Route path='/contact-me'> <Contact /> </Route> </Switch> </Router> And click this to go to a page:
<Link to='/'>Home</Link> <Link to='/contact-me'>Contact me</Link> Now I would like to navigate to About.js inside project1 folder, how can I do it with React Router?