> A good example of optional catch all routes is the Next.js docs, a single page called [pages/docs/[[...slug]].js](https://github.com/vercel/next-site/blob/master/pages/docs/%5B%5B...slug%5D%5D.js) takes care of all the docs you're currently looking at.
## Caveats
## Caveats
- Predefined routes take precedence over dynamic routes, and dynamic routes over catch all routes. Take a look at the following examples:
- Predefined routes take precedence over dynamic routes, and dynamic routes over catch all routes. Take a look at the following examples: