-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
Description
Hi,
Today I tried to link the Chrome Extension Devtools https://pixijs.io/devtools/ with my react app. However, it was really difficult, is this the right way to do it?
Here's how I did it (this works):
const application = useApplication();
(globalThis as unknown as {__PIXI_APP__: Application<Renderer>}).__PIXI_APP__ = application.app;
Here's what I tried but it didn't work, (I also tried multiple other combinations e.g. without useEffect):
const application = useApplication();
useEffect(() => {
initDevtools({ app: application.app});
}, [application.app]);
I expect that the second piece of code should work but I had to rely on globalThis... Is this how it is supposed to be?