Closed mutewinter closed 5 months ago
This is correctly, on initial render it doesn't have any old props on it.. we might set the type to something like Readonly<P> | undefined
?
Currently it’s an empty object, which means it doesn’t throw when accessing one level deep props. But I agree with changing it to undefined is more clear. It would be a breaking change.
Description
oldProps
is defined here asoldProps: Readonly<P>,
, however on first render it is an empty object. This can cause errors when attempting to accessoldProps
values on first render.Steps to reproduce
applyProps
oldProps
Additional info
@inlet/react-pixi
version: 6.8.0React
version: 17ReactDOM
version: 17PIXI
version: 6