server components, data fetching, rendering strategy
Next js uses server components by default
Scenario Questions
0-2 years experience
1You need to add a header that shows the logged‑in user's name, but you want it rendered on the server. How would you implement this using a Next.js server component?
2If you import a client‑only library like a date‑picker inside a server component, what error would you see and how would you fix it?
3When you place a fetch call inside a server component, at what point does the data get fetched – build time, request time, or client side?
2-5 years experience
1Your product page fetches inventory from an external API via a server component, but the API sometimes returns 500 errors. How would you handle those errors so the rest of the page still renders?
2After adding a server component, the Time To First Byte for a high‑traffic route increased noticeably. What could be causing the slowdown and how would you diagnose and improve it?
3Explain why a server component cannot use useState or useEffect, and how you would restructure a feature that needs interactivity.
5-8 years experience
1Design a mixed rendering strategy for a dashboard where most widgets are static but one requires real‑time updates. Which parts would you make server components versus client components, and how would you manage data flow between them?
2Our legacy pages rely on getServerSideProps. We want to migrate them to server components. What architectural considerations and migration steps would you propose to minimize risk and keep performance high?
3Discuss the implications of streaming server components to the client in terms of SEO, caching, and error handling.
8+ years experience
1At scale we have thousands of server components across many teams. How would you establish shared libraries or conventions to ensure consistent data‑fetching patterns, type safety, and avoid bundle bloat?
2A critical security vulnerability is discovered in a third‑party library used only in server components. How would you coordinate the fix across teams and what safeguards would you put in place to prevent similar issues?
3If we need to support both edge runtime and Node.js runtime for server components, what trade‑offs arise and how would you design the codebase to abstract those differences?
Follow-up Questions
What are the SEO benefits of using a server component for this feature?
How does streaming affect the user‑perceived load time?
If a server component throws during rendering, how does Next.js handle the error?
Sharethis question
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.