Design comparison
Solution retrospective
Hi! My main question with this project is that i noticed that whenever I click on the button there is a small flash of the previous advice before it changes to the new one, is there a fix to it?
Thank you for taking the time to read this and help me!
Community feedback
- @MelvinAguilarPosted 11 months ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
-
The "Advice Slip JSON API" documentation indicates that repeat requests within 2 seconds will return the same advice. If you wish to receive a new response in each request, add the
cache: 'no-cache'
header.await fetch(apiUrl, { cache: 'no-cache' });
I hope you find it useful! ๐
Happy coding!
Marked as helpful1@EnzoDev10Posted 11 months agoHi Melvin, thank you so much for the suggestion, i'll fix it right away. I should have checked the documentation more carefully and i'll have it in mind for my next projects โ๏ธ
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