Closed
Description
This is kind of related to #801 but as far as I can tell the PR to fix (#792) it doesn't fix my issue. I modified the reproduction case from #801 there to show my issue:
import React, {PropTypes} from "react";
export default React.createClass({
propTypes: {
bar: PropTypes.func,
},
componentWillReceiveProps (nextProps) {
if (nextProps.foo) { // this line should trigger the 'prop-types' rule but doesn't
return;
}
},
render () {
this.props.bar;
return <div />;
}
});
Metadata
Metadata
Assignees
Labels
No labels
Activity
mqklin commentedon Jan 8, 2018
@yannickcr seems like it isn't fixed:

react/prop-types
doesn't warn if I get props fromnextProps
In this case there should be an Error about
x
as well.@Eschon did you resolve the issue?
ljharb commentedon Jan 8, 2018
Since this is from a year ago, could you file a new issue for your use case?
mqklin commentedon Jan 8, 2018
Yes, today I'll do it