Description
Current State:
NAVIGATION.md documents the existing navigation system
- Contains "How to remove backTo from URL" section mentioning static routes
- References the deprecated
backTo parameter
- No documentation for the new dynamic routes approach
Expected State:
- Add comprehensive section on Dynamic Routes
- Document when to use dynamic routes vs static routes
- Provide step-by-step migration guide for contributors
- Explain
DYNAMIC_ROUTES configuration and createDynamicRoute() usage
- Document
entryScreens access control
- Reference ESLint rules that enforce the pattern
Documentation Sections to Add
1. What Are Dynamic Routes?
Explain the concept of dynamic route suffixes and how they differ from static routes.
2. When to Use Dynamic Routes
- Use when a screen is reused across multiple flows
- Use when "back" destination should be wherever user came from
- Do NOT use when screen has fixed back destination
3. Dynamic Routes Configuration
Document the DYNAMIC_ROUTES config and createDynamicRoute() usage.
4. Entry Screens (Access Control)
Explain the entryScreens array and security implications.
5. How to Add a New Dynamic Route
Step-by-step guide for adding new dynamic routes.
6. Migrating from backTo to Dynamic Routes
Migration guide for contributors.
7. ESLint Enforcement
Document the ESLint rules that prohibit backTo/forwardTo patterns.
Scope
Files:
App/contributingGuides/NAVIGATION.md - Add new sections
Dependencies:
Description
Current State:
NAVIGATION.mddocuments the existing navigation systembackToparameterExpected State:
DYNAMIC_ROUTESconfiguration andcreateDynamicRoute()usageentryScreensaccess controlDocumentation Sections to Add
1. What Are Dynamic Routes?
Explain the concept of dynamic route suffixes and how they differ from static routes.
2. When to Use Dynamic Routes
3. Dynamic Routes Configuration
Document the
DYNAMIC_ROUTESconfig andcreateDynamicRoute()usage.4. Entry Screens (Access Control)
Explain the
entryScreensarray and security implications.5. How to Add a New Dynamic Route
Step-by-step guide for adding new dynamic routes.
6. Migrating from backTo to Dynamic Routes
Migration guide for contributors.
7. ESLint Enforcement
Document the ESLint rules that prohibit
backTo/forwardTopatterns.Scope
Files:
App/contributingGuides/NAVIGATION.md- Add new sectionsDependencies: