nodeRef solution for React 19 does not work due to incorrect build output
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react
- Lĩnh vực
- build-system, frontend
Hướng nghiên cứu
Start with lib/DraggableCore.js at the nodeRef check and compare its behavior with the compiled output shown in the issue. Run or review the linked main.spec.ts tests to reproduce the empty-ref case. Done means the built package preserves the intended nodeRef behavior and the React 19 scenario no longer falls back to findDOMNode.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The recommended solution for the React 19 findDOMNode removal is to provide a DOM element reference via nodeRef. This does not work due to how react-draggable is being built.
The check being done for provided nodeRef here falls back to using ReactDOM.findDOMNode when nodeRef is an empty ref ({ current: null }), which is always the initial value for DOM refs.
The source code appears to be doing the correct thing and should not result in this behavior, but the compiled code changes the behavior:
findDOMNode() {
var _this$props$nodeRef$c, _this$props;
return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);
}
I have some tests proving this here.
- Ngôn ngữ chính
- JavaScript
- Star
- 9.3k
- Fork
- 1k
- Merge trung bình
- 2 giờ 35 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react-grid-layout/react-draggable
-
bug ready-for-agent
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
react-grid-layout/react-draggable#822 · 2 bình luận ·
-
V4.5.0 Chrome Extension ErrorĐang mởbug needs-info
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
react-grid-layout/react-draggable#782 · 2 bình luận ·
-
bug needs-info
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
react-grid-layout/react-draggable#772 · 1 bình luận ·
-
error in react 19Đang mởbug ready-for-agent
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
react-grid-layout/react-draggable#771 · 14 bình luận · 31 reaction ·
-
enhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
react-grid-layout/react-draggable#762 · 1 bình luận ·
Tất cả issue của react-grid-layout/react-draggable
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
hexlet-codebattle/codebattle#2361 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
micromatch/picomatch#223 ·
Maintainer thường phản hồi trong vòng 11 ngày
-
Upgrade MongoDB Node.js driver to 7.6+ for full MongoDB 9.0 compatibilityCó thể đã có người làm @ga262 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
parse-community/parse-server#10754 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
margelo/react-native-vision-camera#4211 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
platformatic/platformatic#5161 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày