pixijs / pixi-react

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

Error: Expected subtree parent ... with react 18 alpha #306

Closed samanrnr closed 3 years ago

samanrnr commented 3 years ago

Description

Stage component does not work with react 18

is there any way to solve this problem before releasing new update?

Steps to reproduce

1. 2.

Additional info

inlet commented 3 years ago

This is because we depend on react-reconciler, once React 18 gets stable we can update the host config to meet the new react-reconciler api

unicornware commented 2 years ago

@inlet are there are any temporary solutions?

upgrading to react 18 seems to be the only way to put together a createPortal hack.

inlet commented 2 years ago

@unicornware I haven't got the time to make this library react 18 compatible, but please feel free to open a PR and we can work together on the implementation.

unicornware commented 2 years ago

@inlet don't have the bandwidth at the moment, which is why i was looking for temp solutions. for now i've opted to not use the Stage component at all. little more work, but seems to do the trick

inlet commented 2 years ago

Great to hear you've found a workaround! I'll see if I have time the coming weeks to update this library