Skip to content

[BT-007] Update NAVIGATION.md with Dynamic Routes Documentation #80912

@mjasikowski

Description

@mjasikowski

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:

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions