0React: detect unnecessary effects with ESLint | Sébastien Rigaux
Sébastien Rigaux

React: detect unnecessary effects with ESLint

Repository
View resource

github.com

This ESLint plugin flags useEffect patterns that unnecessarily complicate React code, pairing each anti-pattern with a specific alternative and a link to the documentation. It covers derived state, chained state updates, and effects used as event handlers, among other cases.

Its analysis considers state, props, context, refs, and dependencies to assess when an effect runs. It offers recommended and strict configurations, and also works with Oxlint.

GitHub repository banner showing its name, a profile photo, and counts for contributors, users, discussions, stars, and forks.