Created
January 5, 2019 23:19
-
-
Save aigoncharov/aff6fdb96e61fe081b700ee60fe2040b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CatsGetInit extends ActionStandard {} | |
class CatsGetSuccess extends ActionStandard {} | |
class CatsGetError extends ActionStandard {} | |
const reducerCatsLoading = createReducer( | |
false, | |
reducerLoadingMap(CatsGetInit, CatsGetSuccess, CatsGetError), | |
) | |
const reducerCatsData = createReducer(undefined, { | |
[CatsGetSuccess.type]: () => action.payload, | |
}) | |
const reducerCats = combineReducers({ | |
data: reducerCatsData, | |
loading: reducerCatsLoading) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment