Design comparison
Solution retrospective
All feedback is welcome!
Community feedback
- @elaineleungPosted about 2 years ago
Hi Lucas, good job getting this to look pretty close to the design! You probably just need to shift it up 1.5rem or 2rem and you might have it pixel perfect 😊
Your app does have a small issue that's commonly seen when viewing it on Firefox (which I use), and the issue is, the next advice won't load, or it takes a while to load, and this could be mainly due to caching. If you have Firefox, you can test it out. To fix it, simply add a header request object in fetch:
fetch("https://api.adviceslip.com/advice", { cache: 'no-cache' })
Lastly, since the data is just text, I suggest using
textContent
instead ofinnerHTML
, as you don't have any HTML to parse, andtextContent
is normally preferrred.Marked as helpful0
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