1.actions must be plain objects.Use custom middleware for async
原因:dispatch(action)谓形,action格式不對(duì)
例如:
改成:
2.Cannot convert undefined or null to object
原因:渲染的時(shí)候用到的數(shù)據(jù)源為null或不存在
解決:數(shù)據(jù)源非真的時(shí)候不進(jìn)行渲染聘萨!
shouldComponentUpdate(nextProps, nextState){
alert(123);
console.log(nextProps);
if(!nextProps.datasource){
return false;
}
return true;
}