React Hooks Tutorial | Build Yelp in React #26 | create custom hook to fetch data from Yelp API

preview_player
Показать описание

This is part 26 of our build Yelp in React series in which we will build our first custom React hook to reach out to the Yelp Fusion API.
Комментарии
Автор

***IMPORTANT UPDATE REGARDING CORS-ANYWHERE***

It seems like it does not work out of the box anymore. To get the API working, you have two options:

*** Option 1: ***
I made lambda function that hits the Yelp API endpoint. So you do not need an API key anymore. Simply send a request to

The location and the term are the values you pull from the form

*** Option 2: ***
This will set a cookie and give you temporarily access to the hosted version of cors-anywhere.
Please note that if you get a 403 again, you need to click the button again. That's why I would recommend going with option 1.

Unfortunately I cannot change the videos once they have been uploaded.

jgoebel
Автор

Thank you!! it was a bit difficult in the end but keep moving forward!

idevbrandon