O'Reilly logo

Pro React by Cássio de Sousa Antonio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5

image

Routing

The URL is an important strength that the Web has over native apps. It was born as simple pointer to a document on a server, but in web applications the best way to think of it is as the representation of the application’s current state. By looking at the URL the user can understand the part of the application where he currently is, but he can also copy it for later use or pass it along.

Implementing Routing the “Naive” Way

To understand how basic routing works as well as the complications that quickly arise in scenarios a little bigger than basic, non-nested navigation, let’s begin by implementing a simple component that, depending ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required