Routing in React Js

Understand the Routes and Route components of react-router.

This lesson covers the two main components of the react-router:

  1. Routes
  2. Route

What is routing in react?

In complex web applications, dividing different components and pages for different routes/URLs increases performance. Through routing, we can render different components on different URLs. For example:

  • This URL will only load the profile component.

  • This URL will only load the tweets with the media files.

The react-router provides two different interfaces, Route and Routes, to implement and declare our routes. Let’s review them individually.

Get hands-on with 1200+ tech skills courses.