DEV Community

Discussion on: How to build a book recommender in React.js

Collapse
 
farhanaxmustafa profile image
Farhana • Edited

Hey Charles! Thanks for reaching out. There might be a missing closing bracket above your componentDidMount method. It looks like Line 5 should be constructor(props). Ensure that it has a opening curly bracket and closing curly bracket like this:

  constructor(props) {
    super(props);
    this.state = {
      error: null,
      isLoaded: false,
      items: [],
      rank: 0,
      title: "",
      author: "",
      book_image: "",
      amazon_product_url: ""
    };
  }

  URL = 'https://api.nytimes.com/svc/books/v3/lists/current/hardcover-fiction.json?api-key=';
  mykey = config.MY_KEY;

  componentDidMount() {