From ef1338075a3a0b6b4af092bfc3d9df542efff833 Mon Sep 17 00:00:00 2001 From: Kayla Gordon Date: Fri, 6 Dec 2024 09:43:12 -0700 Subject: [PATCH] Move Outlet to self-guided part of router lesson --- module3/lessons/react-router-prework.md | 1 - module3/lessons/react-router.md | 154 ++++++++++++------------ 2 files changed, 77 insertions(+), 78 deletions(-) diff --git a/module3/lessons/react-router-prework.md b/module3/lessons/react-router-prework.md index aa53656e..2cdf90e3 100644 --- a/module3/lessons/react-router-prework.md +++ b/module3/lessons/react-router-prework.md @@ -35,7 +35,6 @@ Any code that uses a React-Router-provided component must be wrapped in a _route #### Route Matchers 2. What does the `` component do? 3. What does the `` component do? -4. What does the `` component do? #### Route Changers 9. What does the `` component do? How does a user interact with it? diff --git a/module3/lessons/react-router.md b/module3/lessons/react-router.md index ac0f208c..ffe96b17 100644 --- a/module3/lessons/react-router.md +++ b/module3/lessons/react-router.md @@ -17,7 +17,6 @@ module: 3 * `NavLink` A special version of the \ that will add styling attributes to the rendered element when it matches the current URL. * `Route` Its most basic responsibility is to render some UI when a location matches the route’s path * `Routes` A component that wraps your Route components that selects the best path match -* `Outlet` A component that renders the next match in a set of matches. it must exist in the parent component when nesting routes * `useParams` A hook that allows us to gain access to a Route's params @@ -39,7 +38,6 @@ In small groups, discuss the following questions: - Routes - Link - NavLink -- Outlet --> ## Why Routing? @@ -498,11 +496,11 @@ export default Creatures; - - -Now that you know how to use Outlet, let's explore other ways we can achieve dynamic routing without it. -We are going to remove our nested route and define a new separate route for `/:animal/:id` which is not directly nested within the first route `/`. Each route has it's own component. -You would use this approach when you have distinct pages or components that should be displayed separately based on the URL. -