-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
After upgrading to 7.30 we have found out that some function component are highlighted by this rule even if they are declared with normal functions rather than arrow functions.
Looking at the code base we found out that these happens only for those components which has an arrow comparison function:
function MyComponent(props) {
return <b>{props.name}</b>;
}
const MemoizedMyComponent = React.memo(
MyComponent,
(prevProps, nextProps) => prevProps.name === nextProps.name
)It looks like the linter considers the comparison function as an other component.