From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Outlet component

Outlet component

Hello and welcome back, in this video we are going to discuss the outlet component. The outlet component act as a placeholder. It actually tells the parent component where the child component's content is going to be rendered. It has to be placed inside the parent component's JSX. In our case, we have it in dashboard layout and this is defined on the area where we actually want the child's content to be appeared. Let's take a look. In our application, we are going to go in the dashboard layout. Let's control click on this. Over here, you have the dashboard content available. So, this is all the parent content that we want to show the user always whenever the route is with the prefix of Dashboard. This area is going to remain constant and it won't be changed. As you can see, you have link component which we discussed in the previous lessons. The path to the first link is the Dashboard slash profile which is going to show the user profile. The second one is for the settings and we have…

Contents