Next.js · Senior · Question 65 of 75

Why shouldn't a server component fetch your own Route Handler (/api/products) for data?

Explanation

Call the data source or a shared data-access function directly. Route Handlers are for external clients: mobile apps, webhooks, third parties.

Further reading

Problem with a question

Next.js · Senior · question 65

Test yourself

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

Take this quiz