Design comparison
Solution retrospective
Hi hiii!! I really wanted to start to use react here! So i did this little one here, isn't it cute? Lmao. This API has an interval of 2 seconds between its recalls, so i tried my best to make it visible! Hope you like.
Please, if you have any critic or recommendation, plz comment, i'm loooving this communit's feedback
I'll try to make some changes in the future like:
- Changing the background when it's locked.
- Random citation easter eggs;
- More moving pieces lmao.
Community feedback
- @elaineleungPosted about 2 years ago
Hi Lucas, great work building this out with React, and I like your the various transition effects you added π
What you did as the loading screen is a very interesting choice and probably the first one I've seen that does that. It makes me think that you can even write as an advice "The first advice is to roll the dice" π
Aside from that, the main suggestion I have here is to add error handling for your
async/await
, which you can do usingtry/catch
. About the delay, it may have to do with caching; also right now there's an issue where on Firefox (which I use), the next advice is not able to load, and I've seen this on a number of solutions. You can try adding a header object in fetch, like this:fetch("https://api.adviceslip.com/advice", { cache: 'no-cache' })
You can test it out on Firefox and see if you have the browser. Well done here, and keep going π
Marked as helpful1@LukiticasPosted about 2 years ago@elaineleung thank you so much, Elaine!! I'll try to address these issues asap β₯οΈ. About the caching, i thought it was a API problem and that i couldn't fix it directly.
1
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