Key Feature's of Recipe Auto-Suggestion Component :
Auto-Suggestion :
- Provides real-time suggestions based on user input.
- Fetches suggestions from an API or filters from a static list.
Debouncing :
- Check Network Tab to see the reduced number of API's Calls : Reduces the number of API calls by waiting for a specified period before fetching suggestions after the user stops typing.
Caching :
- Stores previously fetched suggestions to avoid redundant API calls and improve performance.
- Type the Same Query for searched Recipe to check if API's getting called or it's showing the cached suggestion
Highlighting :
- Highlights the matching part of the suggestion text based on the user input for better visibility.
Error Handling :
- Displays error messages when the network request fails, response error or no result found.
Loading Indicator :
- Shows a loading message while fetching suggestions from the API.