GithubHelp home page GithubHelp logo

technigo / exercise-w7-dog-facts-use-effect-hook Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 30.0 35 KB

A simple React app utilising the useEffect hook to fetch and display Dog Facts from an external API

JavaScript 81.08% HTML 17.39% CSS 1.53%

exercise-w7-dog-facts-use-effect-hook's Introduction

React Dog Facts useEffect Hook Exercise

For this weeks practice you will practice using the useEffect hook to create a simple app that will use an external free API to retrieve Dog Facts.

"The better I get to know men, the more I find myself loving dogs." - Charles de Gaulle

Instructions:

Fetch the data from the Dog Facts free API JSON File and pass down the data from the parent component to its child component. We've created the necessary components for you, now it's up to you to pass the prop properly to the DogFact.jsx component. Keep in mind that this exercise's repository styles.css is empty, and feel free to add CSS if you'd like—it's encouraged! The primary focus here remains to master the useEffect hook and efficiently passing data received from the API into different components via props in React.

API

https://dogapi.dog/api/v2/facts

Getting Started with the Project

Dependency Installation & Startup Development Server:

Once cloned, navigate to the project's root directory and this project uses npm (Node Package Manager) to manage its dependencies.

The command below is a combination of installing dependencies, opening up the project on VS Code and it will run a development server on your terminal.

npm i && code . && npm run dev

exercise-w7-dog-facts-use-effect-hook's People

Contributors

antonellamorittu avatar dzc1 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.