mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
eb6869fe4c
Summary: If the setter is used both inside and outside the effect then usually the solution is more complex and requires hoisting state up to a parent component since we can't just remove the local state. To do this, we now have 2 caches that track setState usages (not just calls) since if the effect is passed as an argument or called outside the effect the solution gets more complex which we are trying to avoid for now