No Direct useEffect Never call useEffect directly. For the rare case of syncing with an external system on mount, use useMountEffect() . export function useMountEffect ( effect : ( ) => void | ( ( ) => void ) ) { / eslint-disable react-hooks/exhaustive-deps, no-restricted-syntax / useEffect ( effect , [ ] ) ; } The only place useEffect may appear directly is inside reusable custom hooks (like useMountEffect itself, or a useData hook when no fetching library is available). Components must never import or call useEffect . The 6 Rules Rule 1: Derive state, do not sync it If you can calculate it from existing state/props, compute it inline. Show more Installs 313 Repository alejandrobailo/…e-effect GitHub Stars 61 First Seen Mar 18, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass
no-use-effect
安装
npx skills add https://github.com/alejandrobailo/no-use-effect --skill no-use-effect