Uncaught TypeError: Cannot read property 'props' of null

后端 未结 4 1528
猫巷女王i
猫巷女王i 2021-01-30 14:00
  • I have a react code
  • this code renders various panels in the UI.
  • when I click a tag, this function is called sportsCornerPanel()
  • but I am getting
4条回答
  •  走了就别回头了
    2021-01-30 14:33

    It looks like you might be missing a getDefaultProps method on your React component. You might consider something generic like this, just to nullify the error and see what else is up:

    getDefaultProps () { return {}; }

提交回复
热议问题