Table of Contents
React App that lets people view and vote on cheesy jokes from icanhazdadjoke API
- List jokes fetched from icanhazdadjoke API, along with:
- "vot-up" Button
- "vot-down" Button
- net score for each joke
- User can vote and net score should update
- Should show loading state when loading jokes
- Should show the jokes sorted by net score, and update this as the scores changes on each fetch
- Should show dynamic vote-border-color and emoji based on joke net vote score
- Should persist the list of jokes in local storage
-
When user visit the app, it should show saved jokes, rather than fetching new jokes, However the user should still be able to generate new jokes via the "New Jokes" button, and these new jokes should update the ones in local storage.
-
This project require some perquisites and dependencies to be installed, you can view it online using this demo. or you can find the instructions below:
To get a local copy, follow these simple steps :
-
Clone the repo
git clone https://github.com/abdrahmansoltan/Dad-Jokes.git
-
go to project folder
cd dad-jokes
-
install dependencies
npm install
-
Run development server
npm start
- FrontEnd Development Server runs on port
3000
- joke: https://icanhazdadjoke.com/ [GET]
- headers:
"application/json"
- headers:
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request