Ex. 3 - Data Fetching

Instructions

We will now retrieve the data from the TheMovieDB API. An API key has already been created, so we can focus on the application part.

To retrieve the data, we will use the library axios, this allows to make HTTP requests in a simple way and to ensure compatibility on all browsers.

  • Install axios
  • Using useEffect,useState and axios recover data from the API

Expected result

When the user types in the search field, the corresponding movie list is displayed.

Help

How should I use the Movie API with Axios?

App.js