View Code? Open in Web Editor
NEW
This project forked from boolean-uk/react-use-effect-dependencies-practice-1
JavaScript 44.22%
CSS 4.66%
HTML 51.11%
react-use-effect-dependencies-practice-1's Introduction
- Build a component with an effect hook that watches for changes to a given value and triggers the effect
- In
App.js
set up a useEffect
to run whenever the dataType
state is changed
- When the effect is triggered, make a
fetch
request to https://swapi.dev/api/${dataType}/
- Store the returned JSON data in the
data
state using setData
react-use-effect-dependencies-practice-1's People
Contributors