Created
August 26, 2019 14:37
-
-
Save arunkarnann/d767b612cccb526cdea9dfdb3967ce36 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
import * as ACTION_TYPES from '../actions/action_types' | |
const initialState = { | |
stateprop1 : false | |
} | |
const Reducer1 = (state = initialState, action) => { | |
switch(action.type){ | |
case ACTION_TYPES.SUCCESS: | |
console.log("In Reducer 1") | |
return { | |
...state, | |
stateprop1: true | |
} | |
case ACTION_TYPES.FAILURE: | |
return{ | |
...state, | |
stateprop1: false | |
} | |
default: | |
return state | |
} | |
} | |
export default Reducer1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment