Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Advice generator app using fetch

shikoto 1,010

@shikot0

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

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

dgjenni2 320

@dgjenni2

Posted

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 helpful

1

shikoto 1,010

@shikot0

Posted

@dgjenni2 Thanks for the feedback

1

Please log in to post a comment

Log in with GitHub
Discord logo

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