antvis / XFlow

React component for building interactive diagrams.
https://x6.antv.antgroup.com/xflow/guide/introduction
MIT License
597 stars 243 forks source link

xflow这个报错怎么解决?ReactDOM.render is no longer supported in React 18 #474

Closed 583849487 closed 3 months ago

583849487 commented 4 months ago

问题描述

只要渲染画布区的节点就会有这个报错,是什么原因呢?

重现链接

重现步骤

image

预期行为

解决报错

平台

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

xflow-bot[bot] commented 4 months ago

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the AntV community! 💪💯

vok123 commented 4 months ago

渲染react组件时因为xflow引用的@antv/x6-react-shape版本是2.0.8,该版本是react 18以下使用的。可以在项目package.json中加入

"resolutions": {
    "@antv/x6-react-shape": "2.2.3"
}

清理编译缓存重新再试试

583849487 commented 3 months ago

通过@antv/x6-react-shape的版本为2.2.3,已解决报错。