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

Error with react 18

Open plantain-00 opened this issue 3 years ago • 2 comments

Description

seems related: https://github.com/inlet/react-pixi/issues/306

react-dom.development.js:22665 Uncaught Error: Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.
    at findCurrentUnmaskedContext (react-pixi.es-dev.js:3904:15)
    at getContextForSubtree (react-pixi.es-dev.js:20484:23)
    at Object.updateContainer (react-pixi.es-dev.js:20603:17)
    at Stage.componentDidMount (react-pixi.es-dev.js:22880:17)

Steps to reproduce

  1. Use the code from https://reactpixi.org/components/graphics
  2. The error above appears.

Additional info

  • @inlet/react-pixi version: 6.7.0
  • React version: 18.0.0
  • ReactDOM version: 18.0.0
  • PIXI version: 6.3.0

plantain-00 avatar Apr 23 '22 02:04 plantain-00

Is there a solution for this?

jdlee022 avatar Sep 20 '22 01:09 jdlee022

Is there a solution for this?

I couldn't find any solution in the past several months, so I migrated to raw WebGL instead.

plantain-00 avatar Sep 20 '22 01:09 plantain-00

@plantain-00 @jdlee022 You can use @saitonakamura/[email protected], it has support for react 18 and we've being using it in production for a month

saitonakamura avatar Oct 07 '22 09:10 saitonakamura

This should be fixed now in v7.0.0-alpha.0, please install from @pixi/react-pixi

baseten avatar Dec 30 '22 12:12 baseten