Skip to content

Commit

Permalink
Merge pull request #556 from pixijs/555-react-19-support
Browse files Browse the repository at this point in the history
React 19 support
  • Loading branch information
trezy authored Dec 30, 2024
2 parents b1cb314 + 3ea27a2 commit 18d52d1
Show file tree
Hide file tree
Showing 78 changed files with 573 additions and 411 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ const MyComponent = () => {
}
```

###### `attachToDevtools`

Setting `attachToDevtools` to `true` will automatically attach the application to the [Official Pixi.js Devtools](https://chromewebstore.google.com/detail/pixijs-devtools/dlkffcaaoccbofklocbjcmppahjjboce).

###### `defaultTextStyle`

`defaultTextStyle` is a convenience property. Whatever is passed will automatically be assigned to Pixi.js's [`TextStyle.defaultTextStyle`](https://pixijs.download/release/docs/text.TextStyle.html#defaultTextStyle).
Expand Down Expand Up @@ -207,8 +203,8 @@ const MyComponent = () => {
If you're using Typescript, this new `<viewport>` component will throw type errors. Pixi React exports a `PixiReactElementProps` type that can be used to solve this. You'll need to pass the `Viewport` into `PixiReactElementProps` and inject it into JSX:

```ts
import type { PixiReactElementProps } from '@pixi/react'
import type { Viewport } from 'pixi-viewport'
import { type PixiReactElementProps } from '@pixi/react'
import { type Viewport } from 'pixi-viewport'

declare global {
namespace JSX {
Expand Down
125 changes: 52 additions & 73 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 7 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,26 @@
]
},
"dependencies": {
"react-reconciler": "0.29.2"
"react-reconciler": "0.31.0"
},
"devDependencies": {
"@pixi/extension-scripts": "^4.0.0",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^16.0.0",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.5.2",
"@types/react": "^18.3.2",
"@types/react-reconciler": "0.28.8",
"@types/react": "^19.0.0",
"@types/react-reconciler": "^0.28.9",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/browser": "^2.0.4",
"husky": "^8.0.0",
"jsdom": "^25.0.0",
"pixi.js": "8.2.6",
"playwright": "^1.45.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rollup": "^4.18.0",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-sourcemaps": "^0.6.3",
Expand All @@ -89,13 +89,7 @@
},
"peerDependencies": {
"pixi.js": "^8.2.6",
"react": ">=18.0.0",
"react-dom": ">=18.0.0"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
}
"react": ">=19.0.0"
},
"overrides": {
"rollup": "^4.18.0"
Expand Down
Loading

0 comments on commit 18d52d1

Please sign in to comment.