React Js Nested routing — Corporate standard — Best way to implement react routing
Easier than you think. Believe me!
Published in
4 min readMay 29, 2021
Sole intention of this story is to learn nested routing.
SUMMARY of Story:
- What is nested routing?
- URL naming conventions
- Why nested routing?
- Advantages of nested routing
- Code example and implementation
- 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)
✓…