Skip to content

Commit

Permalink
React Router: Clarify how to navigate to child routes of /profile (#2…
Browse files Browse the repository at this point in the history
…9038)

Previously only implied you have to navigate manually via URL. Some expected links to be added to the page.
  • Loading branch information
mhamza-khalid authored Nov 2, 2024
1 parent 3915947 commit a289ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react/the_react_ecosystem/react_router.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const Profile = () => {
export default Profile;
```
Check out the `/profile`, `/profile/popeye` and `/profile/spinach` pages. The `<Outlet />` component gets replaced with the children component when their paths are visited.
Check out the `/profile` page. To visit `/profile/popeye` or `/profile/spinach` pages, manually add `/popeye` or `/spinach` to the end of the current URL. The `<Outlet />` component gets replaced with the children component when their paths are visited.
If you want to render something as a default component when no path is added to Profile, you can add an index route to the children!
Expand Down

0 comments on commit a289ecf

Please sign in to comment.