Skip to content

Fix: Update render to execute injectIntoDevTools once#308

Open
EotronRM wants to merge 1 commit into
brianzinn:masterfrom
EotronRM:fix/run-injectIntoDevTools-once
Open

Fix: Update render to execute injectIntoDevTools once#308
EotronRM wants to merge 1 commit into
brianzinn:masterfrom
EotronRM:fix/run-injectIntoDevTools-once

Conversation

@EotronRM

@EotronRM EotronRM commented Jan 25, 2024

Copy link
Copy Markdown

This PR solves the error:
image

This is reproducible when we try to unmount a Scene to generate a new component changing the key react prop:
https://codesandbox.io/p/sandbox/codesandbox-react-tsx-forked-chj46s

Please open the codesanbox repro example in a separate tab, because only happens when your browser has React DevTools extension.

This fix is based on this issue:
pixijs/pixi-react#251

@EotronRM

EotronRM commented Jan 25, 2024

Copy link
Copy Markdown
Author

Hey @brianzinn please take a look to this PR.

@brianzinn

Copy link
Copy Markdown
Owner

First of all thank-you for your contribution and sorry for leaving this so long. I am trying to clean up the issues and merge all the PRs. if you are still available and willing... The code-sandbox is really helpful, but I am unable to reproduce on FF or Edge with React Dev Tools. I am clicking the "GenerateKey" button and it resets the scene correctly with no errors and the Components tab seems to be working. I don't know if Dev Tools has been updated in the interim to allow being called multiple times or if I am doing something incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants