mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
2f4fba4d70bed365195aeb78f24f51bb66d2bdbe
Summary: This brings the behavior of ref mutation within hook callbacks into alignment with the behavior of global mutations--that is, we allow all hooks to take callbacks that may mutate a ref. This is potentially unsafe if the hook eagerly calls its callback, but the alternative is excessively limiting (and inconsistent with other enforcement). This also bans *directly* passing a ref.current value to a hook, which was previously allowed. ghstack-source-id:e66ce7123ePull Request resolved: https://github.com/facebook/react/pull/30917 DiffTrain build for [e78c9362c0](https://github.com/facebook/react/commit/e78c9362c014dccaed5ff193106e44d7d072dc32)
Please do not delete this branch
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%