pixijs / pixi-react

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

Typescript says 'width' isn't allowed on <Stage /> #342

Closed Heilemann closed 2 years ago

Heilemann commented 2 years ago

Description

Seeing this typescript error on Stage, but it doesn't make sense to me? Pretty sure Stage is supposed to take a width. The documentation page for it says so at least.

CleanShot 2022-05-06 at 12 20 08@2x

Additional info

inlet commented 2 years ago

Are you using @types/react v 18 perhaps?

Heilemann commented 2 years ago

Doesn't look like it, from my package.json: "@types/react": "^17.0.37",

inlet commented 2 years ago

image

Unfortunately I cannot reproduce the issue.. it's working as expected:

image

inlet commented 2 years ago

Closing the issue as I cannot reproduce this, please let me know if and why we should reopen this issue. Thanks!

inlet commented 2 years ago

Maybe your typescript settings are incorrect? can you check your tsconfig.json

Heilemann commented 2 years ago

Looks like this:

{ "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": [ "src" ] }

inlet commented 2 years ago

Can you try a CRA?