ReactJs/Redux Invariant Violation: Could not find “store” in either the context or props of “Connect(LoginContainer)”

后端 未结 3 1516
深忆病人
深忆病人 2021-02-20 11:13

Not sure why I\'m getting this error, it happened when I added connect from redux to my Login component, so I could connect my store.

3条回答
  •  长发绾君心
    2021-02-20 11:52

    You need to pass store as either a prop or context in your test. mount method accepts context as another parameter.

    and how do you get store here? You create store the same way you created in app.js

提交回复
热议问题