You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property 'store' of null
at WrappedComponent.Connect(GoodsDetail) [as constructor] (index.esm.js?94e6:496)
at new WrappedComponent (index.esm.js?eb04:2343)
at mountComponent (index.esm.js?eb37:1715)
at ComponentWrapper.init (index.esm.js?eb37:2144)
at createElement (index.esm.js?eb37:1401)
at mountChild (index.esm.js?eb37:1466)
at mountVNode$1 (index.esm.js?eb37:1456)
at createElement (index.esm.js?eb37:1406)
at patch (index.esm.js?eb37:948)
at updateComponent (index.esm.js?eb37:1858)
复现步骤
在context.js里写export const PageControllerContext = Taro.createContext({} as any)
在页面中使用,并将页面connect到redux导出。
顺便一提,ts这里会报错
Property 'Consumer' is missing in type 'Taro.Context<any>' but required in type 'React.Context<any>'.
问题描述
依据文档使用static contextType = CounterContext或MyClass.contextType = MyContext这两种使用方式都会报错,只有使用的页面会报错,不使用的没问题。
复现步骤
顺便一提,ts这里会报错
期望行为
不要报错,正常显示页面
报错信息
见上
系统信息
Taro CLI 1.3.19 environment info:
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
npmPackages:
@tarojs/async-await: 1.3.19 => 1.3.19
@tarojs/components: 1.3.19 => 1.3.19
@tarojs/plugin-babel: 1.3.19 => 1.3.19
@tarojs/plugin-csso: 1.3.19 => 1.3.19
@tarojs/plugin-sass: 1.3.19 => 1.3.19
@tarojs/plugin-uglifyjs: 1.3.19 => 1.3.19
@tarojs/redux: 1.3.19 => 1.3.19
@tarojs/redux-h5: 1.3.19 => 1.3.19
@tarojs/router: 1.3.19 => 1.3.19
@tarojs/taro: 1.3.19 => 1.3.19
@tarojs/taro-alipay: 1.3.19 => 1.3.19
@tarojs/taro-h5: 1.3.19 => 1.3.19
@tarojs/taro-swan: 1.3.19 => 1.3.19
@tarojs/taro-tt: 1.3.19 => 1.3.19
@tarojs/taro-weapp: 1.3.19 => 1.3.19
@tarojs/webpack-runner: 1.3.19 => 1.3.19
eslint-config-taro: 1.3.19 => 1.3.19
eslint-plugin-taro: 1.3.19 => 1.3.19
nerv-devtools: ^1.4.5 => 1.4.5
nervjs: ^1.4.5 => 1.4.5
react: ^16.9.0 => 16.9.0
stylelint-config-taro-rn: 1.3.19 => 1.3.19
stylelint-taro-rn: 1.3.19 => 1.3.19
The text was updated successfully, but these errors were encountered: