Chapter 9. Router

The home page looks great. Visitors to Code Café find a stylish app and can easily see what items are available for purchase.

Unfortunately, clicking a thumbnail does not do anything. Customers have no way to buy or even find out more about the café’s tasty treats.

In this chapter, you will take a step toward fixing that. It is time to introduce routing to your application.

In React, you use routing to keep the UI in sync as a user navigates through the application. Remember that React is declarative, so you define the UI for a URL, and React will render the elements needed to make it happen.

You will use the popular React Router library to create routes in your application. By the end of this chapter, clicking a Thumbnail ...

Get React Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.