[eslint] Do not allow useEffectEvent fns to be called in arbitrary closures (#33544)
Summary: useEffectEvent is meant to be used specifically in combination with useEffect, and using the feature in arbitrary closures can lead to surprising reactivity semantics. In order to minimize risk in the experimental rollout, we are going to restrict its usage to being called directly inside an effect or another useEffectEvent, effectively enforcing the function coloring statically. Without an effect system this is the best we can do.
J
Jordan Brown committed
97cdd5d3c33eda77be4f96a43f72d6916d3badbb
Parent: eb7f8b4
Committed by GitHub <noreply@github.com>
on 7/10/2025, 8:51:12 PM