Design comparison
Solution retrospective
This is my first time using an API so I suppose the code looks a bit sketchy however it appears to work on both Chrome and Firefox, which is where most people had issues.... If anyone has any advice on how to work with APIs your feedback would be appreciated.
Community feedback
- @dgjenni2Posted about 2 years ago
Nice, simple solution. The fetch looks good, except I'd remove the console.log() statement before the final commit so that you don't log backend information to the console. I might also try to use a single .then() to handle the response rather than chaining two together, but nothing technically wrong with how you implemented it.
On the css, I would recommend using classes and using tag selectors more than just ids. While ids do work on a smaller project like this, class and tag selectors can apply more broadly and be reusable between components. Also, really would try to avoid the hard coded pixel heights and widths in the css and use REM or EM units instead.
Overall, nice work and keep at it!
Marked as helpful1
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