Created
March 18, 2019 13:36
-
-
Save mdmoin7/e96f1223188085652635733f48ad7c68 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
import {INCREMENT,DECREMENT} from '../actions/counterActions.js'; | |
const currencyReducer=(state=0,action)=>{ | |
switch(action.type){ | |
case INCREMENT: | |
return state+1; | |
case DECREMENT: | |
return state-1; | |
default: | |
return state; | |
} | |
} | |
export {currencyReducer}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment