pixi-react
pixi-react copied to clipboard
Error with react 18
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
- Use the code from https://reactpixi.org/components/graphics
- The error above appears.
Additional info
@inlet/react-pixiversion: 6.7.0Reactversion: 18.0.0ReactDOMversion: 18.0.0PIXIversion: 6.3.0
Is there a solution for this?
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 @jdlee022 You can use @saitonakamura/[email protected], it has support for react 18 and we've being using it in production for a month
This should be fixed now in v7.0.0-alpha.0, please install from @pixi/react-pixi