Routing with React Router
In this chapter, we will build a simple app implementing the following pages:
- A home page that welcomes the user
- A products list page that lists all the products
- A product page that provides details about a particular product
- An admin page for privileged users
This will all be managed using a library called React Router.
Through this, we will learn how to implement static links from the products list to the product page and implement route parameters on the product page for the product ID. We will also learn about form navigation and query parameters when it comes to the search feature of our app.
Finally, the chapter will end with how to lazily load code for a page to improve performance.
So, in this chapter, we will cover the following topics:
- Introducing React Router
- Declaring routes
- Creating navigation
- Using nested routes
- Using route parameters
- Creating an error page
- Using index routes...