Skip to content

fix(emoji-board): cancel in-flight gif searches and debounce timers - #1562

Open
eleboucher wants to merge 1 commit into
devfrom
stack/1-hook-races
Open

fix(emoji-board): cancel in-flight gif searches and debounce timers#1562
eleboucher wants to merge 1 commit into
devfrom
stack/1-hook-races

Conversation

@eleboucher

@eleboucher eleboucher commented Aug 1, 2026

Copy link
Copy Markdown
Member

Description

gif search never aborted its requests so a slow response could land after you closed the picker or typed something newer and overwrite the results. now aborts and ignores stale ones.

useDebounce also never cleared its timer on unmount, now it does and returns a cancel().

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-1562-sable.raspy-dream-bb1d.workers.dev 307757e pr-1562 Sat, 01 Aug 2026 15:40:37 GMT

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant