react-book-examples
react-book-examples copied to clipboard
大神,我写到了250页,看不到你效果图上`loading`.
http://stackoverflow.com/questions/42749353/actions-may-not-have-an-undefined-type-property-have-you-misspelled-a-constan
问题在哪啊?
** 改动 代码 ** ,变成这个样子.
loading 依然,没有加载出来啊.
P 标签,
loading
没有展示出来.
case LOAD_ARTICLES: {
return {
...state,
loading: true,
error: false,
};
}
case LOAD_ARTICLES_SUCCESS: {
return {
...state,
loading: true,
error: false,
articleList: action.payload,
};
}
case LOAD_ARTICLES_ERROR: {
return {
...state,
loading: false,
error: true,
};
}
default:
return state;
}

没有 loading 肯 error 啊,大神.
@connect(state => {
return {
articleList: state.home.list.articleList,
loading: state.home.list.loading,
error: state.home.list.error,
};
}, {
push,
...actions,
})
加上这两个就好了.
loading: state.home.list.loading,
error: state.home.list.error,