-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
<Application> does not update the canvas when its width or height props change.
Example
https://codesandbox.io/p/sandbox/5jts6z
import { Application } from "@pixi/react";
import { useState } from "react";
export default function App() {
const [width, setWidth] = useState(200);
const [height, setHeight] = useState(200);
return (
<div>
<div>
<span>Width</span>
<input
type="range"
min={0}
max={500}
value={width}
onChange={(e) => setWidth(Number(e.target.value))}
/>
<span>{width}</span>
</div>
<div>
<span>Height</span>
<input
type="range"
min={0}
max={500}
value={height}
onChange={(e) => setHeight(Number(e.target.value))}
/>
<span>{height}</span>
</div>
<Application width={width} height={height}></Application>
</div>
);
}Metadata
Metadata
Assignees
Labels
No labels