- Source:
Methods
-
withLoadingCount(wrappedReducer, asyncActionTypes)
-
Adds a loading count to the given reducer. For each of the given action types, the count will increase when an action is dispatched with a 'pending' state. The count is decreased again when the an action is dispatched in the 'resolved' or 'rejected' state.
To dispatch actions with these states, dispatch an action with a promise as payload. The asyncActionMiddleware util will automatically convert these actions to separate pending, resolved and rejected actions.
NOTE: This is deprecated. Use
makeIsLoadingSelectorinsteadParameters:
Name Type Description wrappedReducerfunction The reducer to add a 'loading' count to.
asyncActionTypesArray.<string> The action types that this loading count should respond to. Actions with other types are ignored.
- Deprecated:
-
- Yes
- Source:
Returns:
The enhanced reducer
- Type
- function