pixijs / pixi-react

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

Draft: React 18 support #338

Closed saitonakamura closed 1 year ago

saitonakamura commented 2 years ago

Hello @inlet , thanks for your amazing work! I've started working on updating react-pixi to support react 18. We're currently using react-pixi along with react-three-fiber (for webxr stuff) and we're experiencing performance problems. R3F (react-three-fiber) is riding the concurrent train for a while so we decided to give it a shot, but react-pixi (among other things though) is blocking us right now. It's only a draft but i got the first version working. The main painpoint is that docz is pretty much dead and i'm not sure picking it up to support react 18 worth the time. I'm currently looking into using storybook with mdx addon, so let's see how it goes. I'll keep you posted and feel free to comment

Fixes #337

alvinalexander commented 1 year ago

I would like to use this package for an internal project at work, but I need support for React 18. What are the remaining todos for this PR?

hevans90 commented 1 year ago

@alvinalexander you can try using @saitonakamura 's fork that has experimental (but pretty stable) react 18 support here:

https://www.npmjs.com/package/@saitonakamura/react-pixi?activeTab=versions

spassvogel commented 1 year ago

@saitonakamura can we help move this along? from the list on top it's not really clear to me exactly what is meant?

inlet commented 1 year ago

Thanks for all your effort on making it compatible with React 18 @saitonakamura!

I'm thrilled to announce that this library is acquired by the PixiJS Team and they're going to maintain this project from now on 👌 making it a rock-solid React layer for PIXI

More news will be available soon

baseten commented 1 year ago

@saitonakamura thanks for your awesome work on this! I'm going to be getting an official release working with React 18 as soon as possible.

We're still deciding how to handle docs and examples along with a general revamp across the whole PIXI ecosystem - it will likely be a combination of docusaurus and storybook. In the short term getting React 18 support working is the top priority and it appears that is generally a small part of this PR (mainly related to createRoot changes) compared with docs changes?

baseten commented 1 year ago

I've opened a minimal PR just to get the library working with React 18 before we do a docs overhaul in the near future.

https://github.com/pixijs/pixi-react/pull/358

@saitonakamura I think you've been doing a bigger overhaul including docs that may have extended beyond this original draft PR - it might be useful to sync to discuss?

baseten commented 1 year ago

React 18 is now supported, including a matching createRoot API as of v7.0.0 available at @pixi/react