Open WangYuLue opened 3 years ago
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
;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