Closed anaismveras closed 2 years ago
Clicking the link takes the user to a component, the component mounts and renders, inside a useEffect in that component is where the api call happens, which makes it render again with all the data it received from the api
i get that but idk where to put the clicks for things to understand each other
put the API call in the useEffect of the component the Link renders
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
MERN
What's the problem you're trying to solve?
I want to call the api when i press a link but i am not sure how to get it
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
no error
What is your best guess as to the source of the problem?
im not sure how to get the onsubmit to do something
What things have you already tried to solve the problem?