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.
- [Instructor] We can see, that we have now modified the app component to rooting. Essentially we want the users to be able to switch to the FilterableCoursesTable view and the AddCourseForm view. To enable routing across the application, we import BrowserRouter and alias it as Router from the react-router-dom package we've added to the project. We then surround the current app component markup in the alias browser component. To up the navigation links, we create common markup for a header and a nav using a neural linked list and list items to construct the navigation menu. Inside the list items, we use nav link components with the two attributes set to the path in our app that we want to navigate to when a user clicks on the link. We haven't added any routing information to change the views yet but we can see that clicking on the links in the browser means that the URL in the address bar changes depending on the value of the two attribute in the nav link component. You will also notice that after we have visited the links, the user agent styling turns them purple indicating the addresses have been added to the history stack. The next step is to add rating information.
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.