react / react/react-strict-dom
(feature) Event props on components
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
Support web standard event props on all components. This element is not currently supported on native. Although some event props exist in React Native, most of the events are not fired synchronously and/or at the right time, and the event objects themselves do not match web standards (apart from the new PointerEvent implementation).
- onAuxClick
- onBeforeInput (input)
- onBeforeInput (select)
- onBeforeInput (textarea)
- onBlur
- onChange (input)
- onChange (select)
- onChange (textarea)
- onClick
- onContextMenu
- onCopy
- onCut
- onError (img)
- onFocus
- onGotPointerCapture
- onInput (input)
- onInput (select)
- onInput (textarea)
- onInvalid (input)
- onInvalid (select)
- onInvalid (textarea)
- onKeyDown
- onKeyUp
- onLoad (img)
- onLostPointerCapture
- onPaste
- onPointerCancel
- onPointerDown
- onPointerEnter
- onPointerLeave
- onPointerMove
- onPointerOut
- onPointerOver
- onPointerUp
- onSelect
- onSelectionChange
One way to approach this could be to introduce new, synchronous event props in React Native (e.g., onKeyDownSync) that do not require changes to the existing event props. There has been interest in doing this for existing RN use cases beyond web compability. RSD could then use these new props (and rename them in the user-space layer for now) to provide events and event objects that match web.
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 reviewing the existing React Native event props and the new PointerEvent implementation mentioned in the request, then compare their timing and event objects with web standards. Done means the listed component event props are supported with synchronous behavior where needed and web-compatible event objects, without breaking existing React Native use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, react-native
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100