Skip to content

saracemal/react-hooks-simple-data-fetching-lab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Simple Data Fetching Lab

Objectives

  • Practice creating a React component that utilizes fetch to display content

Deliverables

This lab is missing the App component that index.js is looking for. To pass the tests in this lab:

  • Create an App component from scratch
  • Use the useEffect hook. Inside the callback for useEffect, send a fetch request to https://dog.ceo/api/breeds/image/random, a free API that returns a random image of a dog.
  • Display a <p> tag with the text of "Loading..." when the component is first rendered
  • After receiving a response from the API, show the dog image in a <img> tag, with the alt attribute set to "A Random Dog".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.6%
  • HTML 16.5%
  • CSS 0.9%