pixi-react icon indicating copy to clipboard operation
pixi-react copied to clipboard

Bug: Cannot read properties of undefined (reading 'current')

Open Qziem opened this issue 1 year ago • 0 comments

Current Behavior

Hi. I used @inlet/react-pixi (version: 6.8.0) and pixi.js-legacy (version: 5.1.5) and it was working fine. I wanted to upgrade, so a removed @inlet/react-pixi and install newest @react/pixi (version: 7.1.2) and pixi.js-legacy (version: 7.4.2) and with this combination a have an error: Uncaught TypeError: Cannot read properties of undefined (reading 'current') and application dies.

I tried to use @inlet/react-pixi (version: 6.8.0) with pixi.js-legacy (version: 7.4.2) and it works fine, so problem is upgrading from @inlet/react-pixi to @react/pixi. Any ideas what is going on ?

Screenshot from 2024-09-24 16-15-30

Expected Behavior

Application works and not throwing error.

Steps to Reproduce

Just try to render simplest thing, like:

<Stage width={800} height={600} options={{ background: 0x1099bb }}>
  <Container x={200} y={200}>
    <Text
      text="Hello World"
      anchor={0.5}
      x={220}
      y={150}
    />
  </Container>
</Stage>

I think that it's probably with my app configuration but i have no idea what can cause this problem.

Environment

  • @pixi/react version: 7.1.2
  • pixi.js version: 7.4.2
  • React version: ^17.0.0
  • ReactDOM version: ^17.0.0
  • Browser & Version: Chrome 128.0.6613.119
  • OS & Version: Ubuntu 22.04.4

Possible Solution

No response

Additional Information

No response

Qziem avatar Sep 24 '24 14:09 Qziem