generator app with RWD and Fetch API from JS and bem CSS
Design comparison
Solution retrospective
Feel free to provide technical opinions about my code and implementation.
Community feedback
- @elaineleungPosted over 2 years ago
Hi Samuel, good job with this! I just checked out your app and found an issue that I've been seeing on almost all these solutions: on Firefox, and the advice doesn't load again after the first one is loaded, and this is most likely due to caching. If you have Firefox, you can try it out as well. To fix it, try adding a header object in fetch:
fetch("https://api.adviceslip.com/advice", { cache: 'no-cache' })
The other suggestion I have is probably to use an actual advice when the app first loads instead of using lorem ipsum. What I did at first was just to grab any advice and just hardcoded the number and text into the app, but eventually I just put in a loading animation and just fetch the data directly instead of having any hardcoding. You can check out my app here: https://www.frontendmentor.io/solutions/responsive-component-with-api-and-data-fetching-acBCRNQ6R9
Marked as helpful0@Samuel-AmaroPosted over 2 years ago@elaineleung Thanks for the feedback, I will definitely refactor my result, and apply the tips given.
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