How can useEffect be used to load data for a component?
you can fetch data and set states or update props
What browser function can be used to make HTTP requests to a server in React?
How do you use useEffect to load component data just once when the component mounts?
leave the dependency as an empty array
How do you use useEffect to load component data every time the data key changes?
add that as a dependency