Random error on unmount : Unable to find node on an unmounted component.
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- react, typescript
- 領域
- frontend
研究方向
從 rc-trigger/lib/index.js 中的 getRootDomNode、attachParent 和 attachId 開始,接著檢查 stack trace 中顯示的 rc-util raf 回呼。在 antd slider 卸載時,重現從 Suspense 掛載的頁面導覽至另一個 Route。完成的判定標準是卸載轉換不再產生此錯誤;如果儲存庫有合適的測試進入點,則為回報的情境補上測試覆蓋。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- TypeScript
- 星號
- 391
- 分支
- 246
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react-component/trigger 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
react-component/trigger#593 · 1 個 reaction ·
-
Does not work when rendered inside an iframe可能已有人在做 @PinkChampagne17 於 131 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 58/100
react-component/trigger#623 ·
-
useAlign.js: inline style reset to 0 is silently overridden under prefers-reduced-motion CSS (CSSTransition interpolation)可能已有人在做 @baofuen 於 90 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 65/100
react-component/trigger#618 · 1 則留言 ·
-
`collectScroller` is not working as expected when the element is in shadow DOM可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 3/5 1-2 天 新手友好度 42/100
react-component/trigger#555 ·
-
難度 3/5 1-2 天 新手友好度 55/100
react-component/trigger#550 · 1 則留言 ·
查看 react-component/trigger 的全部 Issue
相似的 Issue
-
bug cli service
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
create-element: same editorAlias silent-fallback bug as #201, not covered by that fix可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉generated-by-ai
難度 2/5 1-3 小時 新手友好度 78/100
umbraco/Umbraco-CMS-MCP-Editor#208 · 1 則留言 ·
維護者通常 1 天內回覆
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagree未關閉
難度 2/5 1-3 小時 新手友好度 68/100
sidorares/react-x11-components#764 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
backnotprop/plannotator#1840 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
JoviDeCroock/pracht#432 ·
維護者通常 1 天內回覆