Working with React Router and Forms
React Router is a library for client- and server-side routing. Imagine the usual way websites work; when you click on a link, your browser sends a request to the web server, receives a bunch of data, and then takes time to process everything before finally displaying the content of the new page.
You will get the same experience every time you request a new page from the website. With client-side routing, things get way smoother! Instead of going through that whole process every time you click a link, your web app can update the URL instantly without bothering the server for a new document. This means your web app can quickly show you a new part of the app without any delays. This and more is what React Router offers.
In this chapter, we will explore React Router v6 as a magical tool to handle navigation. You can also use React Router for data fetching but we will limit our scope to component navigation in this book. You will implement simple...