Skip to content

nss-evening-cohort-16/got-jokes

Repository files navigation

Got Jokes

For this intro to react, we are going to build a Joke Generator

DO NOT worry about style until you get the initial functionality together. This is a lightning exercise, so it is meant to be completed in 30 minutes or less.

Make a quick plan and then execute it.

Acceptance Criteria:

  1. When a user first loads the app, a button appears on the DOM that reads "Get a Joke"
  2. When the user presses the "Get a Joke" button, an API call is made to the joke API and the joke setup appears on the DOM.
  3. When a user presses the "Get a Joke" button, the button text changes to "Get Punchline"
  4. When a user presses the "Get Punchline" button, both the joke setup and delivery are on the DOM along with a button that reads "Get Another Joke"
  5. When the user presses the "Get Another Joke" button, the app starts over from step 2.

Resources:

  • API Documentation
  • Get the Postman Collection
    • In Postman, select "Import" > "Link"
    • Copy/Paste this link into the input: https://www.getpostman.com/collections/548ed97710101a76aa64
    • Click "Import"

Stretch

DO NOT complete any stretch goals until the functionality of the application is completed.

Code

DO NOT COPY AND PASTE. Type out every line of code. Try working the code yourself and only use this as a reference

There are 3 button states in our application:

  1. Initial State: Get A Joke
  2. Get Punchline
  3. Get Another Joke

CODE: Button State Changes

There are 3 Joke states in our application:

  1. Initial State: No joke
  2. Joke Setup
  3. Joke setup and joke punchline

CODE: Joke State Changes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published