Design comparison
SolutionDesign
Solution retrospective
Why is my dice image breaking I don't understand please help me with that and whenever I make any commit to my source code its not reflecting in the site even after I gave it some time I don't see any changes why is that?
Community feedback
- @kirtymeenaPosted over 2 years ago
Hi,
I see there is an issue in the API fetch code. The advice is not changing on button click. Add {cache:"no-cache"} in fetch it will work.
fetch("https://api.adviceslip.com/advice",{cache:"no-cache"}) .then(res=>res.json()) .then(x=>{ setId(x.slip.id) setAdvice(x.slip.advice) })
Other than that everything looks fine. The design looks good.
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