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

Jennifer 350

@jennstirpe

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

Community feedback

Andy 520

@AndyAshley

Posted

Hey Jennifer! Great job on the challenge! I did notice that when I click on the fetch button it actually throws 2 requests for some reason, and displays one really quick before updating to the next one. The slip # doesn't change either. You could try putting the entire data.slip in a const and then mapping the data with id and advice. Do your call for the entire data.slip and then store the data.slip.id in one const, and the data.slip.advice in another const, then just throw them in where they go like you did with {quote} . Hope that helps! Awesome job and happy coding!

Marked as helpful

0

Jennifer 350

@jennstirpe

Posted

@AndyAshley Thanks for catching that! It took a little while but I was able to fix it by changing how the useEffect was triggered. It looks a little cleaner now too so I appreciate it!

0
Andy 520

@AndyAshley

Posted

@jennstirpe no problem! I haven’t done that much with useEffect so I couldn’t be much help there, but figured I’d at least let ya know lol.

0

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