src/reducers/search.js
Function entries
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const entries = (state = defaultState, action) => {
switch (action.type) {
case SEARCH_CLEAR:
return defaultState;
Avoid too many return
statements within this function. Open
Open
return state.withMutations((map) => {
map.set('isFetching', false);
map.set('term', searchTerm);
map.set('queryHits', Map({ [action.payload.namespace]: response.hits }));
});
Avoid too many return
statements within this function. Open
Open
return state;