I have a project that includes a toggle behavior to render a container component. When I initially render the component, it renders as expected. When I toggle off rendering the container, the __REACT_PIXI_REQUEST_RENDER__ event is emitted and it does not render the container as expected. However, when I attempt to toggle the container to render back on __REACT_PIXI_REQUEST_RENDER__ is not emitted despite running through the code path as expected.
As a work around, I have a useEffect on the parent component set up to run app.stage.emit('__REACT_PIXI_REQUEST_RENDER__') when toggle is turned back on.
Expected Behavior
I expect __REACT_PIXI_REQUEST_RENDER__ event to emit whenever a component changes, including toggling back on the rendering of the container.
Steps to Reproduce
Haven't been able to reproduce on a minimal reproduction of the issue but does seem to be a bug with pixi/react. Will continue to see if I can get a codesandbox reproduction. raf should be set as false on the app.stage options and renderOnComponentChange should be set to true. I think it is mainly reproducible with toggling a graphics component in a child of a container in a pixi stage.
Current Behavior
I have a project that includes a toggle behavior to render a container component. When I initially render the component, it renders as expected. When I toggle off rendering the container, the
__REACT_PIXI_REQUEST_RENDER__
event is emitted and it does not render the container as expected. However, when I attempt to toggle the container to render back on__REACT_PIXI_REQUEST_RENDER__
is not emitted despite running through the code path as expected.As a work around, I have a
useEffect
on the parent component set up to runapp.stage.emit('__REACT_PIXI_REQUEST_RENDER__')
when toggle is turned back on.Expected Behavior
I expect
__REACT_PIXI_REQUEST_RENDER__
event to emit whenever a component changes, including toggling back on the rendering of the container.Steps to Reproduce
Haven't been able to reproduce on a minimal reproduction of the issue but does seem to be a bug with pixi/react. Will continue to see if I can get a codesandbox reproduction.
raf
should be set as false on the app.stage options andrenderOnComponentChange
should be set to true. I think it is mainly reproducible with toggling a graphics component in a child of a container in a pixi stage.Environment
@pixi/react
version: 7.1.1pixi.js
version: 7.3.3Possible Solution
No response
Additional Information
No response