You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to #782 which actually works properly for me, what doesn't work is when the proptypes are inside shape() :
constPerson=({ person })=><h1>{person.name}</h1>;
Person.propTypes={
person =React.PropTypes.shape({name: React.PropTypes.string,// eslint error 'person.name' PropType is defined but prop is never used// error also pops up on stateful components}),};
It works fine when i dont destructure
constPerson=props=><h1>{props.person.name}</h1>;// no eslint error
The text was updated successfully, but these errors were encountered:
The no-unused-prop-types rule does not support shape props at the moment as such detection is very difficult. If you use shape props, I recommend setting the skipShapeProps option to true on the rule.
Duplicate of #819. Will track further discussion of shape props there.
This is similar to #782 which actually works properly for me, what doesn't work is when the proptypes are inside shape() :
It works fine when i dont destructure
The text was updated successfully, but these errors were encountered: