Skip to content

chore: fix route matching priority example#3889

Open
ihor-av wants to merge 1 commit into
freshframework:mainfrom
ihor-av:patch-1
Open

chore: fix route matching priority example#3889
ihor-av wants to merge 1 commit into
freshframework:mainfrom
ihor-av:patch-1

Conversation

@ihor-av

@ihor-av ihor-av commented Jul 9, 2026

Copy link
Copy Markdown

The current "Route matching priority" example is a bit confusing because the inline comments contradict the preceding explanation

The documentation states that:

  1. Static routes are always checked first.
  2. Dynamic routes are checked in registration order.

However, the example comments imply that /posts/featured is matched first because it was registered first, rather than because it is a static route.

This PR updates the example to:

  • demonstrate that registration order only affects dynamic routes;
  • clarify that static routes always take precedence regardless of registration order.

The current "Route matching priority" example is a bit confusing because the inline comments contradict the preceding explanation

The documentation states that:

1. Static routes are always checked first.
2. Dynamic routes are checked in registration order.

However, the example comments imply that `/posts/featured` is matched first because it was registered first, rather than because it is a static route.

This PR updates the example to:

- demonstrate that registration order only affects dynamic routes;
- clarify that static routes always take precedence regardless of registration order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant