From the course: React.js Essential Training

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Installing React Router v6

Installing React Router v6 - React.js Tutorial

From the course: React.js Essential Training

Installing React Router v6

- [Instructor] On any website, it's really important to have some sort of mechanism for moving from page to page. Now, with React, we're dealing with different components. So how do we move from component to component when we're dealing with a single-age application? The solution for that is to incorporate React Router. React Router will allow for us to seamlessly move from page to page by displaying different components. React Router is at version six right now, so we're going to go ahead and install this in our project. So let's make sure that we're in the correct folder. We're going to move to the react-app that's in chapter seven, lesson one here, and we're going to go ahead and install, npm install react-router-cdom@6. We're trying to install, specifically, version six. Great, so once you've done that, we're going to make some adjustments here to our app. Let's go ahead and get rid of our peaks for now. We're going to…

Contents