Closed climberbrad closed 3 years ago
Passing animal
to useEffect()
allows it to populate correctly but I would love to know how to update only when you hit the submit button.
useEffect(() => {
requestPets();
}, [animal]) //eslint-disable-line react-hooks/exhaustive-deps
Looks like i just needed to make it a little further in the tutorial :)
I've made it to the
useEffects
portion of the course. When implementinguseEffect()
I am not seeing the values ofanimal
,location
orbreed
passed to the url hereI added a console.log in the code below and the value of
animal is always empty
I am using
What am I doing wrong?