react/no-unused-prop-types cannot find props being used inside helper functions #1135
Closed
Description
const showAlert = props => **props.status** === PENDING;
const Alert = (props) => {
if (showAlert(props)) {
return (
<div />
);
}
return <noscript/>;
};
Alert.propTypes = {
**status**: PropTypes.oneOf([PENDING, ACCEPTED, CANCELED])
};
In this case props.status
is being used inside of the function showAlert
.
Metadata
Assignees
Labels
No labels