Add Routes and Links

Learn to add routes, links, and their appropriate components in a React application.

This lesson contains instructions to connect react-router with the React application and add the required Routes and Links components.

Connect react-router with the application

Let’s run the coding widget given in the exercise section. Once the application has started, open the Index.js file and wrap the <App /> component with the <BrowserRouter /> as given in the following code:

Get hands-on with 1400+ tech skills courses.