Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot read properties of undefined (reading 'alternate') #458

Open
b13nxx opened this issue Sep 25, 2023 · 0 comments
Open

Bug: Cannot read properties of undefined (reading 'alternate') #458

b13nxx opened this issue Sep 25, 2023 · 0 comments

Comments

@b13nxx
Copy link

b13nxx commented Sep 25, 2023

Current Behavior

I get the following error when I use the latest version of the React library:

Uncaught TypeError: Cannot read properties of undefined (reading 'alternate')
    at getNearestMountedFiber (react-reconciler.development.js:496:14)

Is it just me or is there a problem with the latest React version?

Expected Behavior

Expected to run smoothly

Steps to Reproduce

Tried to run this code:

import { BlurFilter } from 'pixi.js';
import { Stage, Container, Sprite, Text } from '@pixi/react';
import { useMemo } from 'react';

export const MyComponent = () =>
{
  const blurFilter = useMemo(() => new BlurFilter(4), []);

  return (
    <Stage>
      <Sprite
        image="https://pixijs.io/pixi-react/img/bunny.png"
        x={400}
        y={270}
        anchor={{ x: 0.5, y: 0.5 }}
      />

      <Container x={400} y={330}>
        <Text text="Hello World" anchor={{ x: 0.5, y: 0.5 }} filters={[blurFilter]} />
      </Container>
    </Stage>
  );
};

Environment

  • @pixi/react version: 7.1.1
  • pixi.js version: 7.3.1
  • React version: 18.2.0
  • ReactDOM version: 18.2.0
  • Browser & Version: e.g. Chrome 117
  • OS & Version: e.g. Windows 10 Pro 22H2

Possible Solution

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant