Design comparison
Community feedback
- @Kamlesh0007Posted over 1 year ago
congratulations on completing the challenge!🎉. That's a great achievement, and I'm sure you put a lot of effort into it. I really liked the way you approached the challenge and the code you wrote. You demonstrated a good understanding of the concepts and applied them effectively to solve the problem.I have a few suggestions to improve your code further. I noticed that your app can take some time to load, and it might be a good idea to add a loader to improve the user experience. You can add a loader while fetching data from an API, you can follow these steps: add this code in ur javascript with css of loader in ur stylesheet
const loader = document.getElementById('loader'); function showLoader() { loader.style.display = 'block'; } function hideLoader() { loader.style.display = 'none'; } // Example of fetching data from an API async function generateAdvice() { showLoader(); const response = await fetch(" https://api.adviceslip.com/advice"); const data = await response.json(); hideLoader() advice.innerText = `"${data.slip.advice}"`; adviceId.innerText = `advice #${data.slip.id}`; }
0@iamRed-OnePosted over 1 year ago@Kamlesh0007 wow thank you soo much , i saw what you wrote ,you really went through my work. thank you so much for the feed back i will implement it on my end.
i would like us to be friends , i just sent you a connect message on linkedin
0
Please log in to post a comment
Log in with GitHubJoin 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