20 lines
375 B
JavaScript
Raw Normal View History

import { fromJS } from 'immutable';
import {
2016-09-06 16:59:56 +02:00
PLUGIN_LOADED,
} from './constants';
const initialState = fromJS({
plugins: {},
});
function appReducer(state = initialState, action) {
switch (action.type) {
2016-09-06 16:59:56 +02:00
case PLUGIN_LOADED:
2016-08-23 13:49:15 +02:00
return state.setIn(['plugins', action.plugin.id], action.plugin);
default:
return state;
}
}
export default appReducer;