Design comparison
SolutionDesign
Solution retrospective
Every feedback will be appreciated :)
Community feedback
- @fazzaamiarsoPosted over 2 years ago
Hello Felipe! Nice solution overall!
I found a small redundancy (in my opinion) in your fetch advice. Here is my improvement.
const getAdvice = () => { fetch("https://api.adviceslip.com/advice") .then(r => r.json()) .then(data => generateAdvice(data.slip)); } //if you want to be clearer, you can destructure and rename. .then(({ slip : advice }) => generateAdvice(advice));
I hope it helps! Cheers!
Marked as helpful1@feliveiraPosted over 2 years agoHi Fazza! Wow, it sure helped, thanks for the feedback and for teaching me this other way! :D
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