Advice Generator using an API and fetch

Solution retrospective
This is the first API project I've made without guidance of a tutorial or instruction. I enjoyed building it and I hope to take one more challenges like this soon.
One question, the neon reset button reloads the whole page, is there a better way to re-render the advice data?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @AndrewKohn
Looks great!
My suggestion for your question is to try to add an addEventListener() to your button in javascript and remove the onclick on the html, since I believe that was what is making the page refresh. After that, you can set your fetch method into a const variable and use that in the event listener or cut/paste the fetch method directly into the event listener.
- @Akhlak-Hossain-Jim
Great work for the first time working with API.
But try q instead of p tag for a quote.
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