Design comparison
Solution retrospective
The random advice API showed me the same advice on multiple re-renders, and i wasn't sure if it was my code so i tried replacing it with with a random joke API and it worked 😜
Also added a loader with the matching primary color
Any feedback appreciated!
Happy coding 🎉
Community feedback
- Account deleted
I encountered a simular issue, when the app was displaying the same advice over and over. I found out it was caused by HTTP response caching in certain browsers. Passing { cache: "no-cache" } as the 2nd argument to the fetch() function solved the problem.
Otherwise your solution seems just right. I hope this was helpful
Marked as helpful2@Galaxy159Posted almost 2 years ago@twDevNoob ah man so my code was bad after all 😅 darn
This will be helpful in future projects for sure..
Thanks and have a great day\night 🎉
0 - @denieldenPosted almost 2 years ago
Hello Galaxy, You have done a good work! 😁
Some little tips to improve your code:
- use
main
tag to wrap the card and improve the Accessibility but not as a container of that one element - also you can use
article or blockquote
tag instead ofmain
tag to the container card for improve the Accessibility - remove all
margin
from.container and .generator
classes - use flexbox to the body to center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container
Keep learning how to code with your amazing solutions to challenges.
Hope this help 😉 and Happy coding!
Marked as helpful1@Galaxy159Posted almost 2 years ago@denielden Awesome feedback! Will try the techniques you mentioned
Thanks and happy coding! 😋
1 - use
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