Design comparison
Community feedback
- @AndyAshleyPosted over 2 years ago
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 withid
andadvice
. Do your call for the entiredata.slip
and then store thedata.slip.id
in one const, and thedata.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 helpful0@jennstirpePosted over 2 years ago@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@AndyAshleyPosted over 2 years ago@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 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