p5.js-web-editor/shared/redux/reducers/preferences.js
2016-06-17 13:37:29 -04:00

19 lines
389 B
JavaScript

import * as ActionTypes from '../constants/constants';
const initialState = {
isPreferencesShowing: false
}
const preferences = (state = initialState, action) => {
switch (action.type) {
case ActionTypes.TOGGLE_PREFERENCES:
console.log('in here');
return {
isPreferencesShowing: !state.isPreferencesShowing
}
default:
return state
}
}
export default preferences;