React applications often require navigation between different pages or views, such as Home, About, Projects, or Contact pages. Traditionally, this is done by manually managing state or creating multiple HTML files. However, as applications grow, this approach becomes cumbersome and lacks essential features like seamless navigation and URL-based routing. Let’s explore a scenario to build a small web application using conventional web development techniques and understand the challenges it presents. We’ll then solve the same scenario using React Router to highlight its benefits.

Case study: A portfolio application

We need to build a portfolio website with the following pages:

  • Home: A welcome page.

  • About: Information about the individual.

  • Projects: A showcase of completed projects.

  • Contact: A page to get in touch.

Implementation without React Router

First, we’ll implement it without React Router to understand the limitations of managing navigation manually.

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy