Find effects that subscribe without cleanup

Proprietary

Finds useEffect and useLayoutEffect callbacks that add an event listener, interval, observer or subscription but return no cleanup function, which React 18 StrictMode surfaces by running effects twice in development.

org.openrewrite.react.search.find-effects-without-cleanup
mod run . --recipe=org.openrewrite.react.search.find-effects-without-cleanup

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.