SpinTheMic
Pro

Interview practice question

Data is fetched twice: on the server and again on the client

Frontend Engineering · State Management and Data Fetching · Experienced

Your server-rendered app fetches data on the server, then the client fetches the same data again after hydration. How do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Dehydrate server cache into HTML.
  • Hydrate client cache with it.
  • Set stale time to avoid immediate refetch.
  • Or use server components for that data.
  • Avoid duplicate fetch logic.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics