strapi-plugin-config-sync/admin/src/state/reducers/Config/index.js

20 lines
380 B
JavaScript
Raw Normal View History

2021-03-20 00:54:18 +01:00
/**
*
* Main reducer
*
*/
import { fromJS, Map } from 'immutable';
import { EXAMPLE_ACTION } from '../../actions/Config';
const initialState = fromJS({});
export default function configReducer(state = initialState, action) {
switch (action.type) {
case EXAMPLE_ACTION:
return state
.update('value', () => action.value)
default:
return state;
}
}