Ravenous - Part 4

Hello guys. I am on the last part of “Ravenous” App and this is the first time I came here out of pure desperation. I watched and re-watched the video solution, triple-checked my code and compared to other students’ code from github.

I keep getting the TypeError: this.props.businesses is undefined error. And I’m all out of ideas.
I went through many topics and things that worked for other don’t work for me. I’m sure it must be a comma o a semicolon or something, but at this point I’m too afraid to look at it :slight_smile:

Here is the link to the github:

Same here, I just gave up after a few hours of going at it

Hi,

In App. js

try changing :
searchYelp(term, location, sortBy) {
Yelp.searchYelp(term, location, sortBy).then((businesses) =>{
this.setState({ businesses: businesses });
});
}

to:
searchYelp(term, location, sortBy) {
Yelp.search(term, location, sortBy).then((businesses) =>{
this.setState({ businesses: businesses });
});
}