opensumi / core

🚀 A framework helps you quickly build AI Native IDE products.
https://opensumi.com
MIT License
2.94k stars 375 forks source link

[RFC] 升级到 React 18 #861

Closed bytemain closed 10 months ago

bytemain commented 2 years ago

React 18 有较好的性能提升,并且提供了 Concurrent Mode 给开发者来控制高低优先级的渲染。

看起来值得升级。

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

erha19 commented 2 years ago

已在 #970, 由于对集成侧组件库存在影响,暂时搁置

l1shen commented 1 year ago

请问升级 React 18 有什么进展吗

erha19 commented 1 year ago

请问升级 React 18 有什么进展吗

@l1shen 近期正在做部分组件迁移上的改造,下周会继续这个升级计划

Ricbet commented 1 year ago

目前升上去后能正常 work,功能验证也没问题,但依赖的 mobx 会在控制台报以下错误,提示说在渲染过程中尝试更新另一个组件的状态和属性 image 可能需要调整一些代码来规避。

然后本来想升级 mobx,但目前对方还处于 WIP https://github.com/mobxjs/mobx/pull/3005, 所以 mobx 版本保持不变

actions

erha19 commented 1 year ago

看起来好像在 mobx-react-lite@3.4.0 已经解决这个问题了? @Ricbet

Ricbet commented 1 year ago

看起来好像在 mobx-react-lite@3.4.0 已经解决这个问题了? @Ricbet

晚点再看看

BlackHole1 commented 1 year ago

Hey @erha19 @Ricbet 👋,目前这个 RFC 有什么新的进展么?

bytemain commented 1 year ago

rc-xxx 和 antd 之类是不是也需要升一升

BlackHole1 commented 1 year ago

rc-xxx 和 antd 之类是不是也需要升一升

@bytemain 看起来可以放在另一个 PR 中🤔,可以让升级至 React 18 保持“最小实现”,只升级所必须的 library。以保证 PR 的整洁。

Ricbet commented 1 year ago

Hey @erha19 @Ricbet 👋,目前这个 RFC 有什么新的进展么?

目前主要是 mobx 依赖问题。升级 mobx 有较大的 bk,不升级 mobx 又有 waring 的报错问题(不过这个不影响功能的使用) 这块如果您有兴趣,可以一起来贡献一下~

BlackHole1 commented 1 year ago

@Ricbet 那看起来可以先合并 #2404 并进行发版,因为 mobx warning 并不会影响实际的业务功能。 Mobx 升级可以再另启一个 PR 去做(我可以尝试看一下)

erha19 commented 10 months ago

@BlackHole1 已完成

BlackHole1 commented 10 months ago

感谢你们的工作!