pixijs / pixi-react

Write PIXI apps using React declarative style
https://pixijs.io/pixi-react/
MIT License
2.33k stars 177 forks source link

I tried to use useTick, but An error has been appeared. #345

Closed romansavchuk1 closed 2 years ago

romansavchuk1 commented 2 years ago

Description

I tried to use useTick, but An error has been appeared in React. 2022-06-07_14h26_53 2022-06-07_14h27_24

Steps to reproduce

1. 2.

Additional info

inlet commented 2 years ago

You must wrap the component with <Stage> as stated in the error message

romansavchuk1 commented 2 years ago

image

But same error has been appeared.

inlet commented 2 years ago

You need to wrap the NumberAnimation component in <Stage>:

const App = () => (
  <Stage>
    <NumberAnimation />
  </Stage>
);
romansavchuk1 commented 2 years ago

I got it, I solved it.