We can create routes with other URL paths. It's important to know that the router will navigate to the first matching path it finds in the route record array. So matching paths will be ignored once the first match is found.
Instructor: [00:01] We'll start by importing two new page components, egghead and blog. Next, we'll make a new route record, which is an object. We'll set our path to /blog and set our component to blog. We'll also make a route record for our egghead component, but we're going to set our path to /blog.
[00:52] When we do this, and navigate to /blog, we'll find that we see the blog component and not the egghead component. With matching routes, the first route record in the hierarchy wins. Now, we'll change our path to /egghead, and we'll be able to navigate to our egghead route, which shows our egghead component.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!