Router Components

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. 


- [Teacher] If you want to find links to meet, the a tag isn't gonna work for us. The link component generally replaces the anchor tag, wherever you want to create a hyperlink in your application. The href attribute should be replaced with the to attribute. And this can be either a string, an object, or a function. If you use an object, it could have any of these four properties defined pathname, search, hash, and state. If you use a function, the current location is passed to the function as an argument, and the function should return a location. Which could be a string or an object. Other properties a link component could have are, replace, which is a Boolean that when true means clicking the link replaces the current entry in the history instead of appending to it. innerRef, this is a function and it's there for legacy purposes. And others such as title, ID, class name, and any other props you'd like to be on the rendered anchor tag. However, it's often better from a stylistic point of view to use a special version of the component called NavLink. This add styling attributes to the rendered element, when the URL is matched. Those attributes are activeClassName. This is a string for the CSS class name to be added to the element when it is active. activeStyle is just an object that defines a number of styles to add to the element when it's active. If you supply exact, the active style will only be applied if this is set to true and the location is much exactly. Strict is another Boolean that defines if a match should be made if there is a trailing slash on the location. isActive, is a function to add extra logic to determine if a link is actually active. It's used to calculate if more than the links path name matches the current URLs path name. Location is an object which can be used to compare a different location than when using isActive. An aria-current allows you to set a string value to page, step, location, date, time or true. Look in the documentation for what they mean.

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