Eslint Plugin React You Might Not Need An Effect
eslint-plugin-react-you-might-not-need-an-effect
ESLint plugin to catch unnecessary React effects for simpler, faster, safer code.
Hooks
eslint
eslintplugin
eslint-plugin
react
react-hooks
hooks
useeffect
eslint-plugin-react-you-might-not-need-an-effect
javascript
npm
Stars
1.9k
Weekly
1.4M
Open issues
0
Bundle
~25 kB
Installation
npm install eslint-plugin-react-you-might-not-need-an-effectCode example
import { useEslintPluginReactYouMightNotNeedAnEffect } from "eslint-plugin-react-you-might-not-need-an-effect";
export function Example() {
const value = useEslintPluginReactYouMightNotNeedAnEffect();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Nick van Dyke
- 1.4M weekly downloads. Battle tested
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 0 open issues on GitHub