Unnecessary class components are not allowed.
Class components that do not use any Error Handling-related functionality should be converted to function components.
Examples of incorrect code for this rule:
class MyComponent1 extends React.Component {
render() {}
}
Examples of correct code for this rule:
class MyComponent1 extends React.Component {
static getDerivedStateFromError() {}
render() {}
}
class MyComponent2 extends React.Component {
componentDidCatch() {}
render() {}
}