Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Member-only story

React Js Nested routing — Corporate standard — Best way to implement react routing

Saurabh Shah
Geek Culture
Published in
4 min readMay 29, 2021

--

Sole intention of this story is to learn nested routing.

SUMMARY of Story:

  1. What is nested routing?
  2. URL naming conventions
  3. Why nested routing?
  4. Advantages of nested routing
  5. Code example and implementation
  6. Guidelines

For React Js app architecture in detail refer:
https://saurabhshah23.medium.com/70b7b9103f22

What is nested routing?

Nested routing in react can be thought of multiple forward slash in the URL.

“www.organization.com/employees”
“www.organization.com/employees/:employeeId”
“www.organization.com/employees/:employeeId/projects”
“www.organization.com/projects/:projectId”

URL naming conventions I strongly recommend:

lowercase only
kebab-case/for-multi-word-url (use dash and not underscore or camelCase)

--

--

Saurabh Shah
Saurabh Shah

Written by Saurabh Shah

Solutions architect and technical enthusiast.