New: Intelligent Flashcards spaced-repetition decks for every topic, built to make things actually stick.
In a compound component setup like <Tabs><Tab /></Tabs>, how do the parent and its child pieces usually stay in sync about which tab is selected?
<Tabs><Tab /></Tabs>
Each child keeps its own copy of the selected state and syncs by firing DOM events
The parent shares state implicitly, usually through React context, so the children read it without props being threaded down
The parent hands every piece of shared state to each child as an explicit prop you wire up yourself