Skip to content

Conversation

@retyui
Copy link
Contributor

@retyui retyui commented Jan 20, 2026

Summary:

issue: #55246

TODO:

  • Do Runtime testing
  • Update TS types

Changelog:

[GENERAL] [ADDED] - Allow to pass options to addEventListener(type, listener, {once, signal}) methods

Test Plan:

AppState.addEventListener('change', listener, { once: true }); 
// ^^^ auto cleanup a listener after dispatching  1st event  

AppState.addEventListener('change', listener, { signal: AbortSignal.timeout(5000) }); 
// ^^^ auto cleanup a listener after 5s

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 20, 2026
@retyui retyui marked this pull request as draft January 20, 2026 19:33
@retyui retyui changed the title Draft: feat: Make (AppState, AccessibilityInfo, Linking, BackHandler, Dimensions) EventTarget like feat: Make (AppState, AccessibilityInfo, Linking, BackHandler, Dimensions) EventTarget like Jan 20, 2026
@retyui retyui force-pushed the feat/retyui/EventTarget branch from 2d35cae to a19ae38 Compare January 22, 2026 22:28
@retyui retyui force-pushed the feat/retyui/EventTarget branch from a19ae38 to 4621c2b Compare January 22, 2026 22:31
@retyui retyui marked this pull request as ready for review January 22, 2026 22:31
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants