Rules
no-class-component
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
๐
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Prevents the use of class components.
Component is the base class for the React components defined as JavaScript classes. Class components are still supported by React, but we donโt recommend using them in new code.
It is recommended to define components as functions instead of classes. See how to migrate.
Examples
This rule aims to prevent usage of class components in React.