3 ms·
The problem with understanding what hooks do is that they’re basically an involuntary red pill. React and other libraries supporting function components have ei
by eyelidlessness 6y ago
The problem with understanding what hooks do is that they’re basically an involuntary red pill. React and other libraries supporting function components have either a compiler or runtime fiction that your view is a function of input. Hooks force the reconciliation logic into your view, and turn your “function” into a constructor. Sure, you can reason about it. But now you can’t reason about your language primitives.