Skip to content

feat(hooks): implement useDebouncedSearch with request cancellation - #715

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
YaronZaki:fix/issue-589-implement-debounced-search
Jul 24, 2026
Merged

feat(hooks): implement useDebouncedSearch with request cancellation#715
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
YaronZaki:fix/issue-589-implement-debounced-search

Conversation

@YaronZaki

Copy link
Copy Markdown
Contributor

Summary

Implemented a comprehensive debounced search hook that combines debouncing with AbortController-based request cancellation for optimal API performance.

Changes

  • Created useDebouncedSearch hook with configurable debounce delay
  • Automatic request cancellation when new searches are triggered
  • Minimum query length support for filtering
  • Loading and error states management
  • Cleanup on unmount to prevent memory leaks
  • Exported from hooks index

Closes #589

Add a comprehensive debounced search hook that combines debouncing with
AbortController-based request cancellation for optimal API performance.

Features:
- Configurable debounce delay (default 300ms)
- Automatic request cancellation when new searches are triggered
- Minimum query length support
- Loading and error states
- Cleanup on unmount

Closes MettaChain#589
@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@YaronZaki Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit
nanaf6203-bit merged commit a9e7900 into MettaChain:main Jul 24, 2026

Copy link
Copy Markdown
Contributor

Excellent hook! The debounced search with built-in request cancellation is exactly what we needed for search UX — prevents stale results and reduces unnecessary API calls. Clean, thoughtful implementation. 🔍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Debounced Search

2 participants