client/src/pages/Books/Books.js
// Loads all books and sets them to books
Loads all books and sets them to books
Loads all books and sets them to books
function loadBooks() {
    API.getBooks()
      .then(res => {
        setBooks(res.data.books);
      })
      .catch(err => console.log(err));
  }
function loadBooks ( ) { API . getBooks ( ) . then ( res => { setBooks ( res . data . books ) ; } ) . catch ( err => console . log ( err ) ) ; }
Loads all books and sets them to books
Loads all books and sets them to books
// console.log(res.data.books);