The course is part of this learning path
This module looks at how to Route in React. You’ll be looking at linking components, creating dynamic links, parameterized routes, and how to install the React Router DOM.
The objectives of this module are to provide you with an understanding of:
- How to install the React Router DOM
- Hooks in React
- How to create restful services
- How to use an Effect Dependency Array
- How to hand errors in data requests
- How to send data
This learning path is aimed at all who wish to learn how to use the ReactJS framework.
We welcome all feedback and suggestions - please contact us at firstname.lastname@example.org to let us know what you think.
- [Man] Remember that routing is seen as part of the UI, so it can make any component render one. That's what we've done as part of the filterable courses table and why the course component renders underneath it. So creating nested routes is easy. Just to finish off on the general routing. We've also added a route to the app component with the path of slash courses on line 31 on the right-hand side of the screen. This is so we match any route on the courses path and don't follow our cultural redirect. But back to parameterised routes, the thing that creates the parameterised routes is in the path of the route component, on line eighty six on the left-hand side of the screen. The path is just an evaluated template. Literal string. The use of the colon though, is crucial. This makes this part of the path, a parameter, and this will be inserted by the link that calls the route. Under that, we just render a course component passing in the course as a prop. So now we have a link that supplies a parameter and a route that can recognize it. How do we make the course component aware of that value to display the correct course? That's coming up next.
Ed is an Outstanding Trainer in Software Development, with a passion for technology and its uses and holding more than 10 years’ experience.
Ed is responsible for delivering QA’s Programming Foundations course using the Eclipse IDE. His skillset extends into the DevOps sphere, where he is able to deliver courses based around Agile/Scrum practices, version control, and CI/CD.