我用异步action加载的数据,代码如下:
loadDataFromServer() {
//var mContext = this;
//var url = CommonData.productDetailUrl;
const dispatch = this.props.dispatch;
dispatch(asyncProductDetail(1));
}
为什么在子组件中当浏览器刷新的时候获取到的数据为空?怎么解决?
render(){
const { productDetail } = this.props.mData;
console.log('redux',productDetail);...