src/common/todos/reducer.js
Function todosReducer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function todosReducer(state = new InitialState, action) {
switch (action.type) {
case actions.ADD_HUNDRED_TODOS: {
const todos = action.payload.reduce((todos, json) =>
Avoid too many return
statements within this function. Open
Open
return state;
Avoid too many return
statements within this function. Open
Open
return state.updateIn(['map', todo.id, 'completed'], value => !value);
Avoid too many return
statements within this function. Open
Open
return state.update('map', map => map.delete(id));