How do React hooks associate functions with state?

How do React hooks know which component instance is being called, without being passed a stable identifier? There are many high quality answers online. For me, they either focus too much on React internals ( Fibers , render cycle , ReactFiberHooks ), or are too high level ( “it’s just arrays” , closures, call order). Here is an answer, written for and by me: React stores state for a component…