Created
January 13, 2021 12:28
-
-
Save v-r/e2008ae6f14e0e61cdd799d7c30e5807 to your computer and use it in GitHub Desktop.
vaimo cms
This file contains 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
const reducerMap = { | |
[actions.removeItem.receive]: (state, { count, error }) => { | |
// ... | |
if (error) { | |
return initialState; | |
} | |
// … | |
if (count => 1) { | |
return initialState; | |
} | |
// … | |
return { | |
...state, | |
...payload | |
}; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment