Skip to content

Instantly share code, notes, and snippets.

@mdmoin7
Created March 18, 2019 13:36
Show Gist options
  • Save mdmoin7/e96f1223188085652635733f48ad7c68 to your computer and use it in GitHub Desktop.
Save mdmoin7/e96f1223188085652635733f48ad7c68 to your computer and use it in GitHub Desktop.
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