michalochman / react-pixi-fiber

Write PixiJS applications using React declarative style.
MIT License
864 stars 94 forks source link

Ensure DOM node exists before calling `node.removeChild` & `node.addChild` #298

Closed kyle-villeneuve closed 1 year ago

kyle-villeneuve commented 1 year ago

After patching a very similar issue https://github.com/michalochman/react-pixi-fiber/pull/286 it's gotten a bit further downstream but it's still attempting to manipulate missing DOM nodes. Thus I'm introducing another null check to prevent that. I still think React.Suspense being somewhat incompatible with react-reconciler is the root cause but I'm hoping this workaround is sufficient for our needs🤞

codesandbox[bot] commented 1 year ago

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b9625ab418dfc57652a1f4e09a2a876c7fca8788:

Sandbox Source
React Configuration
React Typescript Configuration
examples Configuration
michalochman commented 1 year ago

Thanks @kyle-villeneuve!

michalochman commented 1 year ago

Included in react-pixi-fiber@1.0.4.