()
| 16 | }) |
| 17 | |
| 18 | export const incrementIfOdd = () => (dispatch, getState) => { |
| 19 | const { counter } = getState() |
| 20 | |
| 21 | if (counter % 2 === 0) { |
| 22 | return |
| 23 | } |
| 24 | |
| 25 | dispatch(increment()) |
| 26 | } |
| 27 | |
| 28 | export const incrementAsync = (delay = 1000) => dispatch => { |
| 29 | setTimeout(() => { |