Description
WHAT IS AN API An API stands for an "Application Programming Interface". It allows communi... Tagged with webdev, react, html, javascript.
Summary
- WHAT IS AN API An API stands for an "Application Programming Interface".
- As the name implies, it gets the data directly from the API.
- This method is used to eradicate pieces of information or data that are not needed.
- In the fetchData function, we set the state to the response of every joke we get from the API setJokes([res.data.joke]);.In the return statement we passed in the fetchData function to a button, for any time we click the button it loads new jokes .