mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
9c419dfd804efa4646784120790e606bb74bd905
> Don’t call Hooks inside loops, conditions, or nested functions Per https://react.dev/warnings/invalid-hook-call-warning#breaking-rules-of-hooks it is invalid to call hooks inside function expressions. We now validate this by default, i'll verify internally before landing. Note the validation is somewhat more conservative and we only disallow known hook calls here, this seems like a reasonable tradeoff but i'm open to suggestions. We could reuse the same known/potential hook mechanism here but it would take some more refactoring.
Languages
JavaScript
49.3%
Rust
26%
TypeScript
22.5%
HTML
1%
CSS
0.9%
Other
0.3%