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
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.
https://dogapi.dog/api/v2/facts
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