pixijs / pixi-react

Write PIXI apps using React declarative style
https://pixijs.io/pixi-react/
MIT License
2.25k stars 173 forks source link

Bug: react 18, pixi 17 #445

Closed just-den closed 1 year ago

just-den commented 1 year ago

Current Behavior

It seems AnimatedSprite example is for @pixi/react 6.

Expected Behavior

No error using app.loader

Steps to Reproduce

The error is:

Uncaught TypeError: Cannot read properties of undefined (reading 'add')
    at JetFighter.tsx:42:1
    at commitHookEffectListMount (react-reconciler.development.js:14778:1)
    at commitPassiveMountOnFiber (react-reconciler.development.js:16604:1)
    at commitPassiveMountEffects_complete (react-reconciler.development.js:16569:1)
    at commitPassiveMountEffects_begin (react-reconciler.development.js:16556:1)
    at commitPassiveMountEffects (react-reconciler.development.js:16544:1)
    at flushPassiveEffectsImpl (react-reconciler.development.js:19182:1)
    at flushPassiveEffects (react-reconciler.development.js:19127:1)
    at commitRootImpl (react-reconciler.development.js:19078:1)
    at commitRoot (react-reconciler.development.js:18825:1)

Environment

"@pixi/react": "^7.1.0",
"pixi.js": "^7.2.4",
"react": "^18.2.0",

Possible Solution

Please note in the documentation what to use instead of the app.loader method for "@pixi/react": "^7.1.0"

Additional Information

No response