no-unused-prop-types
: support shouldComponentUpdate
nextProps #1213
Closed
Description
opened on May 20, 2017
type LoginMsgContainerProps = {
getMsgCodeErrorMsg?: string,
};
class LoginMsgContainer extends React.Component {
props: LoginMsgContainerProps;
shouldComponentUpdate(props: LoginMsgContainerProps) {
if (props.getMsgCodeErrorMsg && props.getMsgCodeErrorMsg.length > 0) {
this.toast.show(props.getMsgCodeErrorMsg);
}
}
...
}
I only use prop getMsgCodeErrorMsg
in the method shouldComponentUpdate
, but the linter raises a react/no-unused-prop-types
error (false positive).
Activity