Advice Generator App with React

Solution retrospective
I'm not sure whether to perform a fetch request inside the useEffect hook or inside the handleClick function.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @OnlyManu
The best way is to do it inside the handleClick function. It's not recommended to do asynchonous task inside useEffect hook.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord