Created
July 13, 2020 14:46
-
-
Save bismitaguha/275f6c9e1e8309de047734fb804f6547 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
const listReducer = (state = initialState, action) => { | |
switch(action.type) { | |
case POST_LIST: | |
return { | |
...state, | |
postobject: action.payload, | |
list: [...state.list, action.payload] | |
}; | |
default: | |
return state | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment