If I make a Pixi component and use it in my NextJS app, it causes this error to appear:
Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'stage')
This will happen even if Stage is the only Pixie React component.
I've made sure that it as a client component and I've also tried using dynamic imports. Neither worked.
I tried reproducing it in a code sandbox, but there it actually worked! It's the exact same code, so I don't know what the issue is.
Current Behavior
If I make a Pixi component and use it in my NextJS app, it causes this error to appear: Unhandled Runtime Error TypeError: Cannot read properties of null (reading 'stage')
This will happen even if Stage is the only Pixie React component.
I've made sure that it as a client component and I've also tried using dynamic imports. Neither worked.
I tried reproducing it in a code sandbox, but there it actually worked! It's the exact same code, so I don't know what the issue is.
Expected Behavior
It not to immediately crash
Steps to Reproduce
https://codesandbox.io/p/devbox/pixinext-issue-spxnsl Note that this works
Steps for my local version that didn't work:
npx create-next-app@latest
in dirnpm run dev
Environment
@pixi/react
version: 7.1.1pixi.js
version: 7.3.3React
version: 18.0.0ReactDOM
version: 18.0.0Possible Solution
No response
Additional Information
No response