7
Handling Navigation with Routes
Almost every web application requires routing, which is the process of responding to a URL based on a set of route handler declarations. In other words, this is a mapping from the URL to rendered content. However, this task is more involved than it seems at first, due to the complexities of managing different URL patterns and mapping them to appropriate content rendering. This includes handling nested routes and dynamic parameters and ensuring proper navigation flow. The complexities of these tasks are why you’re going to leverage the react-router package in this chapter, the de facto routing tool for React.
First, you’ll learn the basics of declaring routes using JSX syntax. Then, you’ll learn about the dynamic ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access