我有一个组件SampleComponent,它安装另一个“连接组件”(即容器)。当我尝试通过挂载测试SampleComponent时(因为我需要componentDidMount),我得到错误:
Invariant Violation: Could not find “store” in either the context or
props of “Connect(ContainerComponent)”. Either wrap the root component
in a,or explicitly pass “store” as a prop to
“Connect(ContainerComponent)”.
测试这个的最佳方法是什么?
酶的安装采用可选参数。你需要的两个是必需的
options.context
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。