Skip to content

Routing catches paths in incorrect order #526

Open
@ArtemSBulgakov

Description

@ArtemSBulgakov

Dynamic routes should not be caught before any other routes.

Example 1

I have the following structure:

/routes/$pageId+.tsx
/routes/posts/index.tsx
/routes/posts/$id.tsx

The route $pageId+ catches all paths. The user cannot get /posts or /posts/$id, these paths are caught by the first route.

Example 2

I have the following structure (notice $pageId without +):

/routes/$pageId.tsx
/routes/posts/index.tsx
/routes/posts/$id.tsx

The user cannot get /posts, that path is caught by the $pageId route (only /posts/index is working for that page).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions