Says prop is unused but it is used within mapStateToProps
binarykitchen opened this issue · comments
Michael Heuberger commented
Experiencing here a false warning with the latest version. For example in the React component I have this
static propTypes = {
companyKey: PropTypes.string.isRequired
}
and further down
const mapStateToProps = (db, props) => ({
size: size(db, props.companyKey),
loading: loading(db, props.companyKey)
})
yet it complains with
10:5 error 'companyKey' PropType is defined but prop is never used react-redux/no-unused-prop-types
10:5 error 'companyKey' PropType is defined but prop is never used react/no-unused-prop-types
That prop is not used in the React component within but in react-redux mapDbToProps function so it should be good.
Ivan Popov commented
@DianaSuvorova is there any update on this issue?