Build an Accessible Recursive Expand-and-Collapse Tree in React
Company: Apple
Role: Frontend Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
Overview: Implement an accessible recursive React tree whose expandable branches keep independent state as users toggle other nodes. The exercise covers stable IDs and keys, immutable state updates, leaf behavior, semantic buttons, aria-expanded, keyboard use, data changes, and scaling to deep trees.
Read the full Apple Frontend Engineer interview experience this question came from