From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Configure the routes and create a navigation component

Configure the routes and create a navigation component

- [Instructor] So now we start to set up routes to map URLs and locations to specific React components. So each time you change the browser URL and path name, the user can navigate to the corresponding components. So to do that, we're going to use other components. I'm going to add them to the scope. So the first one will be routes. And another one, which is route. That we used to configure the routes. First, we add routes, which is like the parent of all the routes, so you must always configure your routes within this component, which is routes. And then to define a routes, it's going to take two props. So first the path, to define the location, the path name, and then the elements. So, which component to display when you navigate to this route. So that's going to be the route location. And for the components, we're going to specify App. So that's going to correspond to the homepage. Okay, so that's going to be the…

Contents