Description
wepy中使用redux,在组件中调用reducer里面的函数改变store里面的state时报错
Environment
- Platform: [开发者工具/iOS/Andriod/Web]
- wepy-cli version: [wepy-cli -v]
- wepy version: [2.0]
Reproduce
[如何重现问题]
新建standar demo运行后点击 ASYNC INCREMENT按钮出现报错
vendor.js:165 Uncaught (in promise) TypeError: this$1.$forceUpdate is not a function
at vendor.js:165
at dispatch (vendor.js:3644)
at vendor.js:3409
at dispatch (vendor.js:4058)
at vendor.js:3404
3条答案
按热度按时间qojgxg4l1#
升级 @wepy/core 解决
yxyvkwin2#
都"@wepy/core": "^2.0.0-alpha.8" 了 @
w7t8yxp53#
@Gcaufy 在wepy2.0里面怎么用promise呢(async, await)app入口示例是一个对象
wepy.app({
globalData: {
userInfo: null
}
});
不是一个类,写成下面这种方法会报错
export default class extends wepy.app {
}