pixijs / pixi-react

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

Expose root to injected components #433

Closed lunarraid closed 1 year ago

lunarraid commented 1 year ago
Description of change

This adds an options argument containing the pixi root to injected components, bringing them more in feature parity with native elements. It also moves the addition of the root object to the injected component before the applyProps call so that the initial applyProps call has access to it the same way native elements do.

Fixes: https://github.com/pixijs/pixi-react/issues/419

Pre-Merge Checklist
codesandbox-ci[bot] commented 1 year 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 84785ed170bf3bdd331e45021a378ccdbe0469cb:

Sandbox Source
sandbox Configuration