Skip to content

React app using class components, retrieving jokes from an API and using local storage to persist jokes and related votes.

Notifications You must be signed in to change notification settings

vacb/react-jokes-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dad jokes React app

Background

This is a simple React app using class components. It fetches a list of jokes from an API which can then be up/down voted. The jokes and votes are persisted in local storage.

The project was built using create-react-app and uses axios to make API calls.

Useful things I practised while doing this project included:

  • React state management
  • React lifecycle methods
  • using local storage
  • event handling
  • API calls and async JavaScript
  • dealing with a loading state

To do

  • Work on the app's behaviour when a joke's votes cause its position to swap - this doesn't currently provide a good user experience
  • Responsive styling

Links

Running the project

After cloning the repo, run npm install to install project.

To run the app in development mode run npm start. Open http://localhost:3000 to view it in your browser.

About

React app using class components, retrieving jokes from an API and using local storage to persist jokes and related votes.

Topics

Resources

Stars

Watchers

Forks