Skip to content

Says prop is unused but it is used within mapStateToProps #49

@binarykitchen

Description

@binarykitchen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions