React: checker is not a function

前端 未结 12 1445
庸人自扰
庸人自扰 2021-02-04 23:25

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 <

12条回答
  •  渐次进展
    2021-02-04 23:33

    FWIW, I was getting Failed PropType: typeChecker is not a function. I noticed that in my PropTypes.arrayOf() properties, I was passing in an object of PropTypes e.g. PropTypes.arrayOf({})instead of passing in PropTypes.shape() e.g. PropTypes.arrayOf(PropTypes.shape({})

    Making this change eliminated the error message.

提交回复
热议问题