Last active
December 2, 2016 00:58
-
-
Save SiestaMadokaist/e7c2e0797c601bea63f6c0f5b5914690 to your computer and use it in GitHub Desktop.
todo-reducer
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 Immutable from 'immutable' | |
import { Actions } from 'actions' | |
const defaultState = new Immutable.List(); | |
function reducer(state = defaultState, action){ | |
if(action.type === Actions.STATE_REPLACE){ | |
... | |
return replacedState; | |
}else if(action.type === Actions.REMOVE_STATE){ | |
... | |
return removedState; | |
} | |
} | |
export default reducers; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment