mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
@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)