Last active
February 13, 2017 23:59
-
-
Save christiannaths/fa67ac87fecae6dd20a02d35347cc433 to your computer and use it in GitHub Desktop.
my-app/src/store/reducers.js
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 { TYPES } from './actions' | |
| const initialStates = { | |
| settings: { | |
| notifications: true | |
| } | |
| } | |
| export const settings = (state = initialStates.settings, action) => { | |
| switch (action.type) { | |
| case TYPES.SET_NOTIFICATIONS: | |
| return Object.assign({}, state, { notifications: action.bool }) | |
| default: | |
| return state | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment