src/1-views/Home.js
// load our books on comp mount
load our books on comp mount
load our books on comp mount
componentDidMount() {
        BooksAPI.getAll()
            .then(resp => {
                this.setState({
                    books: resp
                })
            })
            .catch(error => {
                console.log(error);
            })
    }
componentDidMount ( ) { BooksAPI . getAll ( ) . then ( resp => { this . setState ( { books : resp } ) } ) . catch ( error => { console . log ( error ) ; } ) }
load our books on comp mount
load our books on comp mount
// call the API