Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taro 编译h5 Cannot read property 'dispatch' of undefined #2142

Closed
KingYYH opened this issue Feb 12, 2019 · 7 comments

Comments

@KingYYH
Copy link

commented Feb 12, 2019

index.js?ef09:574 Uncaught TypeError: Cannot read property 'dispatch' of undefined
at Connect.initSelector (index.js?ef09:574)
at new Connect (index.js?ef09:502)
at mountComponent (index.js?36eb:1521)
at ComponentWrapper.init (index.js?36eb:1871)
at createElement (index.js?36eb:1385)
at mountVNode (index.js?36eb:1517)
at Object.render (index.js?36eb:1797)
at eval (app.js?d0a8:404)
at Object../.temp/app.js (app.js:950)
at webpack_require (app.js:765)

@taro-bot

This comment has been minimized.

Copy link

commented Feb 12, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@KingYYH

This comment has been minimized.

Copy link
Author

commented Feb 12, 2019

编译小程序是正常的,版本依赖都是最新 node 8.11.4

@luckyadam

This comment has been minimized.

Copy link
Contributor

commented Feb 13, 2019

不要对 App 使用 redux 连接

@taro-bot

This comment has been minimized.

Copy link

commented Apr 8, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@taro-bot taro-bot bot removed the to be closed label Apr 12, 2019
@taro-bot taro-bot bot closed this Apr 12, 2019
@EvanMaFYH

This comment has been minimized.

Copy link

commented May 25, 2019

不要对 App 使用 redux 连接

在微信小程序下对App使用redux没有报错,应该没啥问题吧如果我只需要编译小程序的话,因为我需要在小程序启动的时候将storage中的内容存到state里

@summer-yyyn

This comment has been minimized.

Copy link

commented Aug 12, 2019

遇到同样的问题,请问有解决办法么?

@HUYIJUNCODING

This comment has been minimized.

Copy link

commented Oct 9, 2019

  • 我这里也遇到同样问题,可是并没有使用connet进行redux连接,关于store的关联写法如下,应该没有问题吧
import {Provider} from '@tarojs/redux'
import StoreUtil from "./store/stateStore";

const store = StoreUtil.getStore();
...

  render() {
        return (
            <Provider store={store}>
            </Provider>
        )
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.