This repository has been archived on 2020-04-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Vim-Vixen/src/content/reducers/addon.js
2018-07-08 11:44:37 +09:00

15 lines
304 B
JavaScript

import actions from 'content/actions';
const defaultState = {
enabled: true,
};
export default function reducer(state = defaultState, action = {}) {
switch (action.type) {
case actions.ADDON_SET_ENABLED:
return { ...state,
enabled: action.enabled, };
default:
return state;
}
}