react-component / react-component/trigger
Random error on unmount : Unable to find node on an unmounted component.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 391
- Fork
- 245
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Actions
We have an antd slider mounted on a Lazy loaded page (with a Suspense parent).
When we click in the menu of our website, this unmount the current lazy loaded page and load an other lazy loaded page. (Using react router component Route)
During this operation, we sometime have an error popping on rc-trigger library.
Is there any way to protect against this ?
Error
Error: Unable to find node on an unmounted component.
at a(webpack://lcdp-react/../node_modules/react-dom/cjs/react-dom.production.min.js:56:67)
at Zb(webpack://lcdp-react/../node_modules/react-dom/cjs/react-dom.production.min.js:57:217)
at exports.findDOMNode(webpack://lcdp-react/../node_modules/react-dom/cjs/react-dom.production.min.js:320:226)
at getRootDomNode(webpack://lcdp-react/../node_modules/rc-trigger/lib/index.js:255:34)
at attachParent(webpack://lcdp-react/../node_modules/rc-trigger/lib/index.js:349:29)
at _this.attachId(webpack://lcdp-react/../node_modules/rc-trigger/lib/index.js:367:19)
at callRef(webpack://lcdp-react/../node_modules/rc-trigger/node_modules/rc-util/lib/raf.js:35:7)
at realId(webpack://lcdp-react/../node_modules/rc-trigger/node_modules/rc-util/lib/raf.js:39:9)
at s(webpack://lcdp-react/../src/helpers.ts:98:1)
Context
rc-trigger version : 5.3.4
antd version : 4.17.3
Yours faithfully,
LCDP
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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.
Hướng nghiên cứu
Start with rc-trigger/lib/index.js at getRootDomNode, attachParent, and attachId, then inspect the rc-util raf callbacks shown in the stack trace. Reproduce navigation from a Suspense-mounted page to another Route while an antd slider unmounts. Done means the unmount transition no longer produces this error, with coverage for the reported scenario if the repository has a suitable test entry point.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100