React Advice Generator

Solution retrospective
I like that I could use the API when I was creating the website, but I would definitely program it differently in CSS next time.
What challenges did you encounter, and how did you overcome them?It was a simple and fun challenge, so I didn't encounter any major obstacles while programming it.
Feedback wellcome 😃
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Itskrish01
Great job on completing the challenge! The output is working as expected, but there are some areas for improvement:
API Call Duplication: Currently, there's an API call in both the AdviceBox and QuoteButton components. Recommendation: Create a single util function for the API call and reuse it in both places.
Loading State: Add a loading effect while fetching new advice. Disable the button during the fetch to prevent multiple simultaneous requests.
Error Handling: Implement error state handling to prevent app crashes if the API request fails.
Implementing these changes will enhance the app's efficiency, user experience, and robustness.
Marked as helpful
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