Skip to main content

Getting Started

To add @pixi/react to an existing React application, install the necessary dependencies:

npm install pixi.js@^8.2.6 @pixi/react@beta

Does it have limitations?

None. Everything that works in Pixi.js will work here without exception.

Can it keep up with frequent feature updates to Pixi.js?

Yes. @pixi/react is a thin wrapper around Pixi.js, allowing it to be expressed via JSX. For example, <pixiSprite> is backed by a Pixi.js Sprite. If a feature is added, removed, or changed in Pixi.js, those changes will be available to you without updating @pixi/react.

What does it look like?

Let's make a reusable component that has its own state, reacts to user-input and participates in the render-loop: