MCPcopy
hub / github.com/reduxjs/redux / incrementIfOdd

Function incrementIfOdd

examples/universal/common/actions/index.js:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

getStateFunction · 0.85
incrementFunction · 0.70
dispatchFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…