React version: 18.2.0

Steps To Reproduce

  1. Yarn create vite
  2. Yarn install pixi.js @inlet/react-pixi
  3. Try this example:
import { Stage, Sprite } from "@inlet/react-pixi";

export default function App() {
  return (
    <div>
      <Stage width={200} height={200}>
        <Sprite x={100} y={100} image="https://s3-us-west-2.amazonaws.com/s.cdpn.io/693612/IaUrttj.png"/>
      </Stage>
    </div>
  );
}

Link to code example: https://codesandbox.io/s/festive-pike-j8f2pu?file=/src/App.tsx

The current behavior

Error Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.

The expected behavior

A canvas with a sprite in the middle (https://codepen.io/dinopens/pen/QWrrmgx): image

0

I would suggest filing this against @inlet/react-pixi instead so that they can reduce this to a minimal repro. Right now this error seems expected since @inlet/react-pixi has no official support for React 18: It only support ^17.0.1 according to their peerDependencies.

Once they have a minimal repro, that's not using 3rd party dependencies and produces the same error, we can revisit.

0
© 2022 pullanswer.com - All rights reserved.