I\'m getting this weird warning message in the console for my React app.
Warning: Failed propType: checker is not a function Check the render method of <
I too got this error on putting proptypes in wrong format:
static propTypes = {
workHard: PropTypes.func.isRequired,
winBig: PropTypes.shape({
prize: { // issue
PENDING: PropTypes.bool,
},
}),
};
Turns out, prop types are expected to be either of type PropTypes.shape
or PropTypes.objectOf
when it comes to declaring object
props
So, error was fixed upon changing code to this:
static propTypes = {
workHard: PropTypes.func.isRequired,
winBig: PropTypes.shape({
prize: PropTypes.shape({
SUCCESS: PropTypes.bool,
}),
}),
};