DEV Community

Cover image for Simple React.js Routing for Beginners
Van Tran H.
Van Tran H.

Posted on

Simple React.js Routing for Beginners

One of the key parts of the modern single page application (SPA) is routing; determining what should show when a user visits a certain page in the application.

Simple React.js Routing for BeginnersSingle page applications are what their name suggests, just a single page that actually looks and feels like multiple pages due to being built up of various components that render like separate pages. The routing in these single page applications is the process and declaration of what specific components or pages the application should render based on the URL, or route.

Routing is a great way to ensure that your application remains clean, scalable and maintainable. In addition to this, it provides us with the ability to navigate through the application without the need to refresh the page, and therefore removes the “blank page flash” that we get when we move from page to page as the screen refreshes; ultimately offering an enhanced user experience as the application feels smoother, faster and more pleasant to use.

In this tutorial I’ll be introducing the basics to routing in React.js, and how we can implement React Router to render specific components when we’re on a specific route in the application. 

Oldest comments (0)