Design comparison
Solution retrospective
This was an interesting challenge to complete! My submission is not quite fully responsive yet, but that will definitely be added soon.
Feel free to let me know if there are any ways that I can improve my code!
Community feedback
- @debriksPosted about 2 years ago
Hi Ninjagor,
Great solution! Congrats
Just have one little suggestion to improve it. In your app, you have to push twice the button to get a new advice, it takes a bit of delay. It is because of the cache (there's actually a note about it on the API website :
Advice is cached for 2 seconds. Any repeat-request within 2 seconds will return the same piece of advice).
This small issue can be fixed by simply adding
{ cache: "no-cache" }
to the API response like so (line 5 of yourmain.js
file):`fetch("https://api.adviceslip.com/advice", { cache: "no-cache" });`
Hope you find this helpful.
Happy coding :)
Marked as helpful0@NinjagorPosted about 2 years ago@debriks
Thanks for letting me know! This was really helpful. I'll definitely add this!
1@debriksPosted about 2 years ago@Ninjagor great! Happy to know my comment could help you!
Happy coding :)
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