class MyComp {
static propTypes = {
myProp: PropTypes.any
};
static getDerivedStateFromProps({ myProp }) {
return {
myStateProp: myProp.something
};
}
}
The following code gives me:
[eslint] 'myProp' PropType is defined but prop is never used
Tested with v7.9.1
Wasn't able to reproduce this on 7.9.1 or latest master 馃
@hornta ah, have you specified your react version in your settings? gDSFP only applies in react 16.3+
Most helpful comment
@hornta ah, have you specified your react version in your settings? gDSFP only applies in react 16.3+