From the course: React: Ecosystems

Routing and navigation - React.js Tutorial

From the course: React: Ecosystems

Routing and navigation

- Lets start with routing and navigation. You use them everyday when you surf the web or navigate through an application's menu. Behind the scenes, routing basically happens as a function of navigating to different pages or sections of a website or app. For example, when you browse a webpage and you click on a navigation link you are routed to a new page. Although it may seem complex initially, routing is really quite simple. Let's say when you click on a link labeled news on the webpage navigation when you do this, the link calls a route named news. This route has a component news attached to it. And the component will render that page in the browser. If you click on other links the same process happens over and over and over. On a mobile or web application it's the same when you tap or click any items that require a render for a new section or page. It's that simple. In React, the best way to get started with routing is by using a great library called React Router. It has a simple syntax and you can get up and running quickly. For more information head over to reacttraining.com forward slash react-router.

Contents