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 (
      <Stage width={200} height={200}>
        <Sprite x={100} y={100} image=""/>

Link to code example:

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 ( image


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.

© 2022 - All rights reserved.