unstale

npm / eslint-plugin-react-prefer-function-component

eslint-plugin-react-prefer-function-component

What changed in eslint-plugin-react-prefer-function-component 2 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

6 breaking

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

eslint-plugin-react-prefer-function-component 52 changes

Breaking changes 2

  • The configuration option is replaced by allowErrorBoundary; users who disabled it must update their rule configuration.

    5.0.0release notes

  • Replaces allowComponentDidCatch and defaults to true; allows class components that use componentDidCatch and/or getDerivedStateFromError.

    5.0.0release notes

eslint-plugin-react-prefer-function-component 41 changes

Breaking changes 1

  • The exported configuration name for ESLint flat configuration now uses the react- prefix; update existing configurations or programmatic processing that expects the old name.

    4.0.0release notes

eslint-plugin-react-prefer-function-component 31 changes

Breaking changes 1

  • The rule now errors on class components extending Component even when they do not use JSX, including renderless components.

    3.0.0release notes

eslint-plugin-react-prefer-function-component 22 changes

Breaking changes 2

  • Usage of React createClass is no longer detected by the plugin.

    2.0.0release notes

  • The plugin now errors on any JSX usage within a class.

    2.0.0release notes