React - Uncaught TypeError: Cannot read property 'func' of undefined

后端 未结 2 1372
不知归路
不知归路 2021-01-19 00:15

I\'m receiving the error:

Uncaught TypeError: Cannot read property \'func\' of undefined

Yet I have no idea why, I\'ve Googled

相关标签:
2条回答
  • 2021-01-19 01:06

    It's very easy to resolve.

    This is happening because you are using react-router version 2.0.0

    Just enter "npm install --save react-router@3.2.0"

    It should just work fine now.

    0 讨论(0)
  • 2021-01-19 01:15

    It looks like a react-router bug (related to prop types.) It's working on react-router 3.2.0

    Check the issue here: https://github.com/ReactTraining/react-router/issues/5605

    0 讨论(0)
提交回复
热议问题