Closed zOadT closed 3 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit f187392fc7562c5cffb2e570c2347b4c29c378ef:
Sandbox | Source |
---|---|
sandbox | Configuration |
Description of change
Update the typings of
applyProps
to show thatoldProps
can be an empty object (this happens on the first render). To access properties onoldProps
users can use thein
operator to check against an empty object:Important: This is a breaking change! It only affects typings though, so users could very easily work around it by adding
@ts-expect-error
comments if they are affected and don't want to adapt their code. Also the change just reflects what is actually passed during runtime, so it might actually benefit the user if they are rechecking their code.So I think it would be okay to introduce this change without a new major version, but I also totally understand if you want to include this only with the next major release.
Fixes: https://github.com/pixijs/pixi-react/issues/348
Pre-Merge Checklist
npm run lint
)npm run test
)