You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi there,
I came across the same problem, I found out the node may have been already removed before commitDeletion (I guess it is because of the way non-blocking works), therefore parentNode is null. I just changed domParent.removeChild(fiber.dom); to fiber.dom.remove();
In
commitWork
function, when enteringDELETION
condition judgment,it shouldruturn
;) } else if (fiber.effectTag === "DELETION") { domParent.removeChild(fiber.dom) + return } commitWork(fiber.child) commitWork(fiber.sibling) }
Otherwise
didact
will repeatedly delete child elements, and will throw a exception:Here is my test code
The operation effect is as follows:
Test it on codesandbox
I open a PR to fix the question
The text was updated successfully, but these errors were encountered: