Routing

Frontend libraries generally incorporate a routing library that provides the possibility of updating sections of the web page with user clicks or hovers through various links. The routing library is often referred to as a router library. Here, a router refers to a frontend framework that observes and listens to the modifications in the URL and maintains the application to be synced with the corresponding view components. React does not incorporate a routing library, and a React application developer has an obligation to choose a router library. There are several routing libraries available. However, react-router-dom is very commonly used. The react-router-dom library has a multitude of features that facilitate configuring routes easily and more efficiently.

Our main focus is learning the Redux framework. The use of routing is one of the most important aspects of React applications. In this chapter, we will discuss the need for react-router-dom and react-router-redux. By now, you should know what routing is and why it is required. Let's dive into using it in our applications. Since our goal is to learn about routing, we will not dig more deeply into the configuration of the application. We will continue to use the code from Chapter 2, Testing, and we will add our layers on top of it.

In this chapter, we will explore the various features available in react-router-dom, and how we can use them in our applications.

The main topics that will be covered in this chapter are as follows:

  • What is routing, and why do we need it?
  • Using react-router-dom in our applications
  • Using react-router-redux in our applications
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset