Skip to content

Welcome to the Dad Jokes React App! This playful web application fetches a collection of 10 dad jokes from an API and displays them for a good laugh.

Notifications You must be signed in to change notification settings

charithmaddoju/Dad-Jokes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dad-Jokes

Dad-Jokes is a React web application that fetches jokes from the Dad Jokes API and provides a fun way to enjoy and interact with dad jokes.

Features

  • Fetches jokes from the Dad Jokes API.
  • Allows users to upvote and downvote jokes.
  • Persists jokes and votes using localStorage, ensuring they remain even after refreshing the page.
  • Sorts jokes based on the number of votes, displaying the most popular ones at the top.

How it Works

  1. Fetching Jokes:

    • The application retrieves jokes from the Dad Jokes API.
  2. Storing Jokes and Votes:

    • Jokes and user votes are stored in the browser's localStorage.
    • This enables the application to retain the jokes and their respective votes even after a page refresh.
  3. Interacting with Jokes:

    • Users can upvote or downvote jokes, influencing their sorting order.
    • Jokes are displayed based on the number of votes, with the most popular jokes appearing first.

Usage

To run the Dad-Jokes application locally and explore its features:

  1. Clone the repository:

    git clone https://github.com/your-username/Dad-Jokes.git
    cd Dad-Jokes
    
  2. Install dependencies:

    npm install
  3. Run the app:

    npm start
  4. Open http://localhost:3000 in your browser.

  5. Enjoy the dad jokes, vote on your favorites, and witness them persist across sessions!

Contributing

Contributions are welcome! If you'd like to contribute or report issues, please create a pull request or open an issue.

License

This project is licensed under the MIT License.


Feel free to modify and expand upon this README to better suit your project's specific details and structure!

About

Welcome to the Dad Jokes React App! This playful web application fetches a collection of 10 dad jokes from an API and displays them for a good laugh.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published