Next.js · Junior · Question 29 of 75

Which route will catch /docs/a/b/c?

Explanation

A catch-all segment [...slug] collects all following segments into an array. A regular [slug] matches exactly one segment. An optional catch-all [[...slug]] also matches /docs itself. Next.js doesn't support asterisks in folder names.

Further reading

Problem with a question

Next.js · Junior · question 29

Test yourself

Take the Next.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz