React Router is a popular library that provides navigational components that integrate with the browser's own navigation system. For example, it can update the current page location that appears in the address bar, and it will make the back button work within your single-page application.
The beauty of React Router is that it can help simplify a great deal of code in addition to adding new functionality. In our example Appointments system, it can be used to simplify our user workflow in the App component. We can also use it to upgrade our CustomerSearch component to store its current search parameters as part of the URL query string. That allows our users to bookmark and share particular searches that they've performed.
In this chapter, rather than walking through a refactor of our codebase, we'll look at specific examples of React Router...