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

前端 未结 5 707
忘掉有多难
忘掉有多难 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:26

    In my case it was Expo server that sometimes doesn't catch filesaves on Windows (probably) and it was seening old version of the component I've tried to connect (I had no export there yet probably). Re-saving my component without really touching anything fixed the issue.

    Restarting Expo server with cleaned cache would probably help as well.

提交回复
热议问题