Open
Description
Hello!
I've updated from eslint-plugin-react@7.7.0 to eslint-plugin-react@7.12.4 and I got some new specific errors. I got unexpected react/no-unused-prop-types
error on 5 and 6 lines in the next code listing.
// @flow
import React from 'react';
export type ChildComponentProps = {
value: string,
name: string
};
export const ParentComponent = ({arrayOfSmth}: Object) => {
return (
<div>
{arrayOfSmth.map(({value, name}: ChildComponentProps) => {
return (
<span>
{name ? value : <Text>{name}</Text>}
</span>
);
})}
</div>
);
};
5:12 error 'value' PropType is defined but prop is never used react/no-unused-prop-types
6:11 error 'name' PropType is defined but prop is never used react/no-unused-prop-types
Is it expected behavior for my case?