BizCharts React 18 compatible: Custom ReactToolTip render warning

utugiqy6  于 4个月前  发布在  React
关注(0)|答案(1)|浏览(61)

BizCharts Version: 4.1.16
Platform: MacOS
Mini Showcase(like screenshots):

当使用自定义的 ReactToolTip 渲染时会提示 Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot ,需要迁移到 React 18 的 createRoot

大概在这两个地方:
https://github.com/alibaba/BizCharts/blob/25de7baa650904507a53e9fdd50e9c6374ea1c06/src/components/Tooltip/ReactTooltip.tsx#L44=

https://github.com/alibaba/BizCharts/blob/25de7baa650904507a53e9fdd50e9c6374ea1c06/src/components/Annotation/reactElement/component.ts#L34=

forck and create a demo: https://bizcharts.net/product/BizCharts4/demo/306

q1qsirdb

q1qsirdb1#

兄弟,解决了吗?我也遇到同样的问题

相关问题