Md Tarek — Portfolio© 2026

Full-stack Developer

System Design — built to hold up.

dhaka → remote, worldwide

Loading experience

Md TarekTarek
Next.js

Server Components vs Client Components: My Mental Model

By: Md Tarek · 18 Oct 2026

Rule of thumb I actually use: start every component on the server, move to the client only when you need a browser API, state, or an event handler.

Server by default

  • Data fetching close to the source
  • Secrets stay secret
  • Less JavaScript shipped

Client when needed

  • useState / useEffect
  • onClick, onChange
  • window, localStorage

The boundary is the "use client" line — everything imported below it ships to the browser. Keep the boundary low in the tree.