Recall & Review
beginner
What does "Zero bundle size for server components" mean in Next.js?
It means server components do not add any JavaScript to the client bundle. They run only on the server, so the client downloads less code, making the app faster.
Click to reveal answer
beginner
Why do server components have zero bundle size on the client?
Because server components render HTML on the server and send it to the client without sending their JavaScript code, so no client-side JavaScript is needed for them.
Click to reveal answer
intermediate
How does zero bundle size for server components improve user experience?
It reduces the amount of JavaScript the browser downloads and runs, leading to faster page loads and less CPU work on the user's device.
Click to reveal answer
intermediate
Can server components use client-side hooks like useState or useEffect?
No, server components cannot use client-side hooks because they run only on the server and do not have access to browser APIs or client state.
Click to reveal answer
advanced
What happens if you import a client component inside a server component in Next.js?The client component and its JavaScript will be bundled and sent to the client, but the server component itself remains zero bundle size.
Click to reveal answer
What is the main benefit of zero bundle size for server components?
✗ Incorrect
Zero bundle size means no JavaScript for server components is sent to the client, reducing load time.
Where do server components run in Next.js?
✗ Incorrect
Server components run only on the server and send rendered HTML to the client.
Which hook is NOT allowed in server components?
✗ Incorrect
useState is a client-side hook and cannot be used in server components.
If a server component imports a client component, what happens?
✗ Incorrect
Client components are bundled for the client even if imported by server components.
Zero bundle size helps improve which of the following?
✗ Incorrect
Zero bundle size means less JavaScript sent to the client, improving bundle size.
Explain how zero bundle size for server components works and why it matters for web performance.
Think about what code the browser downloads and runs.
You got /4 concepts.
Describe the difference between server components and client components in Next.js regarding bundling and execution.
Focus on where the code runs and what is sent to the browser.
You got /4 concepts.