You must pass a component to the function returned by connect. Instead received undefined

前端 未结 5 692
忘掉有多难
忘掉有多难 2021-01-01 11:37

The code below gives

Uncaught Error: You must pass a component to the function returned by connect. Instead received undefined

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 12:19

    More details can be found here.

    There might be three reasons, that are summarized as follows:

    • Circular dependencies between components
    • Wrong usage of export and export default then imported the wrong way
    • Used the connect function wrongly, passed the wrong parameters

    In my case is was Circular dependencies, and the circular-dependency-plugin helped me fix it.

提交回复
热议问题