Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

(feature) Event props on components

Đang mở
#38 4 bình luận 9 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript, react, react-native
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các event props hiện có của React Native và implementation mới của PointerEvent được đề cập trong request, sau đó so sánh timing và các event object của chúng với các web standard. Công việc được xem là hoàn tất khi các event props của component được liệt kê được hỗ trợ với hành vi đồng bộ ở những nơi cần thiết và các event object tương thích với web, mà không làm hỏng các trường hợp sử dụng React Native hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

cannot polyfill feature
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.

Ngôn ngữ chính
JavaScript
Star
3.6k
Fork
206
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react/react-strict-dom

Tất cả issue của react/react-strict-dom

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.