react / react/react-strict-dom
(feature) EventTarget API on host elements
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.6k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature request
The EventTarget interface is implemented by objects that can receive events and may have listeners for them. Native does not currently support this API on host elements.
Previously we had introduced a prototype implementation of addEventListener and removeEventListener in React Native, but it was removed as it needs to be reimplemented properly and integrated with broader changes to React Native. For example, the events need to conform to W3C standards in terms of timing and event payload.
In the meantime, we may be able to polyfill this API using event emitters and the new traversal APIs, which would allow us to emulate capture/bubble phases of events. But, ideally we'd build this into React Native given it would be more performant and there is already an existing event system.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing EventTarget, addEventListener, and removeEventListener discussion, then review the event emitters, traversal APIs, and React Native event system mentioned in the issue. Determine whether the implementation should be a polyfill or integrated into React Native, including W3C-compatible timing, payloads, and capture/bubble behavior; done means host elements support the API consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100