@Itskrish01
Posted
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
@Kamelek1337
Posted
Hi, @Itskrish01
Thank you for your feedback. I will definitely improve my project with your helpful advice.
Best Kamil