React checklist¶
Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).
Also apply the general checklist.
This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.
Strongly recommended (9–10)¶
-
REACT-1(9) Keep components and hooks pure. Side effects belong in event handlers or Effects. (specific/react) Automatable: eslint-plugin-react-hooks.
Recommended (6–8)¶
-
REACT-2(7) Keep state minimal. (specific/react) Automatable: eslint-plugin-react-hooks. -
REACT-3(7) Don't use Effects to transform data or handle user events. (specific/react) Automatable: eslint-plugin-react-hooks. -
REACT-4(7) Put state where it's used, and lift it only as far as the closest common parent. (specific/react) -
REACT-5(7) Treat server state (fetched and cached data) separately from UI state, for example with TanStack Query. (specific/react) -
REACT-6(7) Test components with React Testing Library, which renders them into the DOM and queries them the way users find things. (specific/react) Automatable: eslint-plugin-testing-library. -
REACT-7(6) Start new apps with a framework, or with a build tool such as Vite when you have specific constraints. (specific/react) -
REACT-8(6) Try props and composition before reaching for context. (specific/react) -
REACT-9(6) Extract reusable stateful logic into custom hooks. (specific/react) -
REACT-10(6) Organise larger apps by feature, not by file type. (specific/react) Automatable: eslint-plugin-boundaries. -
REACT-11(6) Move non-view logic (domain, data access) out of components as the app grows. (specific/react) Automatable: eslint-plugin-boundaries.