Created
June 1, 2018 19:06
-
-
Save basekays/656ed7d79451d5abe8a0923dd6dd9836 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
| export default function (state = INITIAL_STATE, action = {}) { | |
| const { | |
| type, | |
| wishlistItem, | |
| } = action; | |
| switch (type) { | |
| case ADD_TO_WISHLIST_SUCCESS: | |
| return { | |
| ...state, | |
| index: [...state.index, { | |
| wishlistItem, | |
| }], | |
| }; | |
| default: | |
| return state; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment