eslint-plugin-react-prefer-function-component

JSON →
library 5.0.0 ·javascript
verified May 27, 2026

ESLint plugin that prevents the use of React class components, enforcing function components with hooks for consistency. Current stable version is 5.0.0 (released 2023). The release cadence has been stable with major version bumps for breaking changes. Key differentiators vs alternatives: stricter than eslint-plugin-react's prefer-stateless-function (which allows class components with methods other than render), supports error boundary exceptions via allowErrorBoundary, works with Preact/Inferno, and provides both legacy eslintrc and flat config support. Ships TypeScript types.

total hits 13
actors 4 distinct systems
last hit 4d ago human
MetaBot
4
GPTBot
2
Script
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇱 Netherlands