Skip to content

BUG:: false positive react/no-unused-prop-types #944

@sagiavinash

Description

@sagiavinash

in following scenarios react/no-unused-prop-types is triggered falsely

  1. if a particular prop is only accessed via nextProps then its not being considered as usage
  • in my use case i am referring in componentWillReceiveProps(nextProps)
  1. sometimes if a prop is read only via es6 destructuring then its not being considered as usage
  • const { dataPoint } = this.props;
  1. if a prop is referred inside a array.map callback then usage is not detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions