This is a simple react application called "DAD JOKE". In this application, I am fetching jokes from an API and rendering those JOKES based on few conditition.
-
This is the first time I am using API call in the react application so I learnt to make API call in the react application using AXIOS library.
-
Next challenge that I was facing of storing the Jokes each time it is being fetched. As for now I was not knowing to connect the database with the application, So I learnt how to store the data in local storage of the browser.
-
Next challenge that I was facing is that everytime when I fetch new jokes from the API, I need to know that which joke are brand new jokes which are now in the local storage so that we can save the our joke list with duplicate items.
-
Next challenge in this project was to give the rating of the jokes and according to that rating I needed to change the expression of the smiley for that particular joke.
- Making an API call.
- Getting the data from the response of the API call.
- Handling error in the API call.
- setting and getting item in the local storage of the browser.
- React component lifecycle.