老师好,6-4章节问题
来源:7-4 列表实现&数据渲染【封装与复用】
鸿鹄4095786
2018-12-31
老师好,6-4,报错,TypeError: _types.default.onLoadPopularData is not a function. (In ‘_types.default.onLoadPopularData(storeName, url)’, ‘_types.default.onLoadPopularData’ is undefined)。我打印了,onLoadPopularData的类型,没问题呀
写回答
2回答
-
慕数据3828779
2020-01-31
我也是这个问题,请问你解决了嘛
012020-01-31 -
CrazyCodeBoy
2019-01-01
参考如下代码进行修改,也可以将你的代码发出来,让老师看看哈:
... loadData() { const {onLoadPopularData} = this.props; const url = this.genFetchUrl(this.storeName); onLoadPopularData(this.storeName, url) } ... const mapDispatchToProps = dispatch => ({ onLoadPopularData: (storeName, url) => dispatch(actions.onLoadPopularData(storeName, url)) });
00
相似问题