Route Information

Developed with
Start course

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.

Learning Objectives 

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   

Intended Audience  

This learning path is aimed at all who wish to learn how to use the ReactJS framework.  


It is essential you understand the face of contemporary web development to attend this course. You should also have JavaScript experience, along with good HTML and CSS skills.


We welcome all feedback and suggestions - please contact us at to let us know what you think. 


- [Instructor] If we examine the React DevTools components tab. Now we've added greeting. We can see that there is a hierarchy of our components mixed with extra components like Router Provider, Router Consumer, and LinkAnchor. Using react router doubles components has added these for its functionality. If we locate the course component, the one highlighted, we can look at the data, that has been passed along to this component. We don't need to look at props because we already know where they would come from. You should also be pretty comfortable by now, with why they might be state and effect hooks displayed in this hook section. Well, you're probably wondering this, where does the Params hut come from? We'll talk about this talk in more detail later. But what is interesting at the moment is the data that it gives us access to. There's a context object here, and now has sub objects of history, location, match and static context. These objects contain information about the Router, history object has information for the history stuff, pushing it, to it with the path name regenerated. Some similar data is stored in the location object and the static context object is not defined. We're not using static routing, so that makes some sense. The match object is the one we're interested in. As it contains the information we need to match the route to the location. As we've learned, routine is all about matching, the locations pathway, to the path URL actually hit. The second part of this information is containing the match object, you'll notice that the path in the URL is slightly different. The path is what we have told, we will be and the URL is the one that actually rendered. If you haven't worked it out yet, the colon ID in the path is there to represent the idea of the course we click on. Any part of a path defined in a route component that starts with a colon, is recognized as a parameter on the route. This gets stored in the Params object. The text after the column becomes the key, and the value is whatever is supplied. If we change the course we change the ID. The display updates, and the match values update, on the contact object to reflect this too. You can see that courses, slash one is now the location and the URL is courses slash one. And the Params ID is courses slash one. That's because web development fundamentals JavaScript, has an idea of one.

About the Author
Ed Wright
Senior Learning Consultant
Learning Paths

Ed is an Outstanding Trainer in Software Development, with a passion for technology and its uses and holding more than 10 years’ experience.

Previous roles have included being a Delivery Manager, Trainer, ICT teacher, and Head of Department. Ed continues to develop existing and new courses, primarily in web design using: PHP, JavaScript, HTML, CSS, SQL, and OOP (Java), Programming Foundations (Python), and DevOps (Git, CI/CD, etc). Ed describes himself as practically minded, a quick learner, and a problem solver who pays great attention to detail. 

Ed’s specialist area is training in Emerging Technologies, within Web Development. Ed mainly delivers courses in JavaScript covering vanilla JS, ES2015+, TypeScript, Angular, and React (the latter is authored by Ed) and has delivered on behalf of Google for PWAs. Ed has also developed a new suite of PHP courses and has extensive experience with HTML/CSS and MySQL. 

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.

Covered Topics