Skip to content

(feature) Event props on components #38

Open
@necolas

Description

@necolas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cannot polyfillThis feature cannot be polyfilled for nativefeatureFeature or technical request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions