poteto 0e51ebf78f [compiler] Allow setStates in use{Layout,Insertion}Effect where the set value is derived from a ref (#34462)
@stipsan found this issue where the compiler would bailout on the
`useLayoutEffect` examples in the React docs. While setState in an
effect is typically an anti-pattern due to the fact that it hurts
performance through cascading renders, the one scenario where it _is_
allowed is if the value being set flows from a ref.

DiffTrain build for [835b00908b](https://github.com/facebook/react/commit/835b00908b1b1c522323162b735a85c5f620ac81)
2025-09-10 12:07:47 -07:00
2023-02-20 16:27:42 +00:00
S
Description
No description provided
Readme MIT
1.8 GiB
Languages
JavaScript 67.1%
TypeScript 29.4%
HTML 1.5%
CSS 1.1%
C++ 0.6%
Other 0.2%