O'Reilly logo

Learning React by Kirupa Chinnathambi

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

13. Creating a Single-Page App Using React Router

Now that you’ve familiarized yourself with the basics of how to work with React, let’s kick things up a few notches. What we are going to do is use React to build a simple, single-page app (also referred to as SPA by the cool kids—and people living in Scandinavia). As we talked about in Chapter 1 forever ago, single-page apps are different from the more traditional multi-page apps that you see everywhere. The biggest difference is that navigating a single-page app doesn’t involve going to an entirely new page. Instead, your pages (commonly known as views in this context) typically load inline within the same page as illustrated in Figure 13-1.

Figure 13-1 Single-page apps use load views inline ...

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