Technical Mid Level

Explain the difference between container and presentational components. Is this pattern still relevant with hooks?

Quick Tip

Show evolution: "The container/presentational split taught us separation of concerns. Now custom hooks achieve the same goal more naturally, letting any component be both smart and focused."

What good answers include

Container components handle data fetching and logic; presentational components handle rendering. With hooks, this pattern is less strictly necessary because custom hooks can extract the logic layer. However, the separation of concerns principle still applies. Strong candidates discuss how custom hooks replaced containers for logic extraction while keeping components focused on rendering.

What interviewers are looking for

Tests architectural thinking in React. Candidates who rigidly follow old patterns or completely ignore separation of concerns both raise flags. Best answers show pragmatic evolution.

← All React questions