TRADEOFF BATTLE

Props drilling vs Context for shared React UI state

Theme, current user, and permissions are needed in several deep React components. Would you keep passing props or introduce Context?

reacteasy11 min

The prompt

You are building a React account area with a layout shell, sidebar, page header, settings panel, and a few deeply nested buttons. Several leaf components need the same stable UI data: the current user, the active theme, and whether the user can see admin-only actions. A few wrapper components sit in the middle only for layout and do not actually care about those values. In the interview, the panel asks whether you would keep passing props through the tree or introduce Context.

Which direction would you defend for this prompt, and how would you explain when the other option is still the better answer?

Pick the direction you would defend

You are not looking for the universal winner. You are picking the strongest answer for this prompt.

Commit to a direction

Pick the option you would defend, then reveal the stronger interview framing for this prompt.

Next step

Choose one side first

This works better when you commit to an answer before seeing the breakdown.

Strong answers are scenario-specific, not universal.