client/reducers/bookReducer.js
Function bookReducer
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
const bookReducer = (state = initialState.bookReducer, action) => {
let books, borrowedBooks;
switch (action.type) {
case actionTypes.FETCHING_BORROWED_BOOKS:
return { ...state, fetchingBorrowedBooks: action.status };
Avoid too many return
statements within this function. Open
Open
return { ...state, books };