function add() {
return { type: 'ADD',
}
}
function addIfOdd() {
return (dispatch, getState) =>
{ const currentValue = getState();
if (currentValue % 2 == 0) { return false; }
//分发一个任务 dispatch(add()) }}
https://blog.youkuaiyun.com/kuangshp128/article/details/67632683