Submitted 11 months agoA solution to the Advice generator app challenge
Advice generator app with VueJS and Fetch API
vue, fetch
@KarenNR

Solution retrospective
What are you most proud of, and what would you do differently next time?
What am I most proud of?
- I disabled the button while data is being fetched. This prevents the user from sending multiple requests before they're completed.
- I used "no-cache" so that advices are not repeated.
- I used environmental variables and successfully configured them in Vercel while deploying them.
What would I do differently next time?
- I actually wanted to try this on Next.JS (maybe "next" time, hahaha)
- CORS error: I had a CORS error after deploying. I eventually found out this was because I was defining headers on the fetch request. This took too many redeploys on Vercel.
- Changing the image depending on the screen size: I used media queries on JavaScript (
window.matchMedia("(max-width: 767.98px)"))
- In mobile, I don't know why the size is larger than the screen (vertically). I defined the height of the container to 100vh.
- Any other comments are welcome!
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Karen Garza's solution.
Join 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