Next.js · Junior · Question 42 of 75

What happens if app/dashboard/ contains both page.tsx and route.ts?

Explanation

Both files claim the same URL, and Next.js reports a conflict. API routes are usually moved into a separate branch, e.g. app/api/....

Further reading

Problem with a question

Next.js · Junior · question 42

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