Skip to content

Conversation

@mhashemii
Copy link

What?

Clarifies the behavioral difference between catch-all ([...slug]) and optional catch-all ([[...slug]]) routes in the Dynamic Routes documentation.

Why?

Readers may not clearly understand the distinction between these two patterns because the original examples use different base paths. This change makes the zero-segment case explicit, helping developers choose the correct pattern for their use case.

How?

Adds a short explanation highlighting that catch-all routes require at least one segment, while optional catch-all routes allow zero or more segments, without introducing overlapping route examples.

This change clarifies the behavioral difference between catch-all ([...slug]) and optional catch-all ([[...slug]]) routes by making the zero-segment case explicit.

This helps readers understand when to use each pattern without introducing overlapping route examples.
@nextjs-bot nextjs-bot added the Documentation Related to Next.js' official documentation. label Jan 1, 2026
@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 7ef9173

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

2 participants