Recall & Review
beginner
What are Next.js Server Components?
Server Components are React components that run only on the server. They can fetch data, access the file system, and do heavy work without sending code to the browser.
Click to reveal answer
beginner
Can Server Components fetch data directly from a database?
Yes. Server Components can fetch data directly from databases or APIs because they run on the server where these resources are accessible.
Click to reveal answer
beginner
Can Server Components use browser-only APIs like localStorage or window?
No. Server Components run on the server and do not have access to browser-only APIs like localStorage or window.
Click to reveal answer
intermediate
What kind of code can run inside Server Components?
Any code that runs on the server can run inside Server Components, such as file system access, environment variables, and server-side logic.
Click to reveal answer
intermediate
Why should you use Server Components in Next.js?
They improve performance by reducing JavaScript sent to the browser and allow secure data fetching and processing on the server.
Click to reveal answer
Where do Next.js Server Components run?
✗ Incorrect
Server Components run only on the server, not in the browser.
Which of these can Server Components do?
✗ Incorrect
Server Components can access the file system because they run on the server.
Can Server Components use React hooks like useState?
✗ Incorrect
Server Components do not support client-side hooks like useState or useEffect.
Why avoid using browser APIs in Server Components?
✗ Incorrect
Browser APIs like window or localStorage do not exist on the server, causing errors.
What is a benefit of Server Components in Next.js?
✗ Incorrect
Server Components reduce JavaScript sent to the browser, improving load speed.
Explain what kinds of code can run inside Next.js Server Components and why.
Think about what the server environment allows that the browser does not.
You got /4 concepts.
Describe the main advantages of using Server Components in Next.js applications.
Consider speed, security, and user experience benefits.
You got /4 concepts.