Created
July 17, 2020 06:25
-
-
Save v-r/8b60157d415b6ab4098c201b1dad4102 to your computer and use it in GitHub Desktop.
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
[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