Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support react 17 #2968

Merged
merged 1 commit into from
Nov 29, 2022
Merged

fix: support react 17 #2968

merged 1 commit into from
Nov 29, 2022

Conversation

NewByVector
Copy link
Contributor

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Enhancement (changes that improvement of current feature or performance)
  • Refactoring (changes that neither fixes a bug nor adds a feature)
  • Test Case (changes that add missing tests or correct existing tests)
  • Code style optimization (changes that do not affect the meaning of the code)
  • Docs (changes that only update documentation)
  • Chore (changes that don't modify src or test files)

Self Check before Merge

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@x6-bot x6-bot bot added PR: unreviewed PR does not have any reviews. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-more-info labels Nov 29, 2022
@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 29, 2022

@NewByVector Please provide us with more info about this pull request.

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #2968 (471eab3) into master (4978110) will increase coverage by 6.58%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2968      +/-   ##
==========================================
+ Coverage   27.29%   33.88%   +6.58%     
==========================================
  Files         197      273      +76     
  Lines       14192    17338    +3146     
  Branches     3014     3766     +752     
==========================================
+ Hits         3874     5875    +2001     
- Misses      10146    11058     +912     
- Partials      172      405     +233     
Flag Coverage Δ
x6 18.57% <ø> (ø)
x6-common 63.60% <ø> (?)
x6-geometry 63.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/x6-common/src/animation/timing.ts 21.19% <0.00%> (ø)
packages/x6-common/src/size-sensor/sensors/util.ts 14.28% <0.00%> (ø)
packages/x6-common/src/dom/event/object.ts 86.79% <0.00%> (ø)
packages/x6-common/src/css-loader/loader.ts 18.18% <0.00%> (ø)
packages/x6-common/src/event/util.ts 90.00% <0.00%> (ø)
packages/x6-common/src/event/events.ts 91.66% <0.00%> (ø)
packages/x6-common/src/dom/mousewheel.ts 21.21% <0.00%> (ø)
packages/x6-common/src/animation/interp.ts 12.50% <0.00%> (ø)
packages/x6-common/src/object/inherit.ts 55.00% <0.00%> (ø)
packages/x6-common/src/algorithm/index.ts 100.00% <0.00%> (ø)
... and 66 more

@NewByVector NewByVector merged commit 94f9042 into master Nov 29, 2022
@NewByVector NewByVector deleted the dev.v branch November 29, 2022 11:40
@x6-bot x6-bot bot added PR: merged PR has merged. and removed PR: unreviewed PR does not have any reviews. labels Nov 29, 2022
@curiousbabyMz
Copy link

curiousbabyMz commented Dec 6, 2022

编译报错,react 17.0.2
./node_modules/@antv/x6-react-shape/es/view.js
Module not found: Can't resolve 'react-dom/client' in '/Users/mz/projects/horn-mobile/node_modules/@antv/x6-react-shape/es'

@x6-bot
Copy link
Contributor

x6-bot bot commented Dec 7, 2022

🎉 This PR is included in the following release 🎉

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

@x6-bot x6-bot bot added the released PR has released label Dec 7, 2022
@x6-bot
Copy link
Contributor

x6-bot bot commented Jan 17, 2023

🎉 This PR is included in the following release 🎉

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

@xiazhaohui
Copy link

xiazhaohui commented Feb 8, 2023

编译报错,react 17.0.2 ./node_modules/@antv/x6-react-shape/es/view.js Module not found: Can't resolve 'react-dom/client' in '/Users/mz/projects/horn-mobile/node_modules/@antv/x6-react-shape/es'

@NewByVector
Copy link
Contributor Author

@xiazhaohui
Copy link

xiazhaohui commented Feb 9, 2023

积重难返

我按社区的方案试了下,因为目前项目使用的reacct是16.x,很多东西有限制,还是会有各种报错。

然后我把react升级到18,x6和@antv/x6-react-shape升级到2.x,除开升级React到18可能带来的未知的问题外,升级后的x6也带来很多报错,例如:_antv_x6__WEBPACK_IMPORTED_MODULE_17__.Graph.registerReactComponent is not a function
等,
将某些API禁掉之后,首屏节点(数百个)的渲染性能是提高了,但是节点和节点之间的连接线渲染速度依旧很低。

再尝试下,如果效果还不佳的话,可能就要放弃升级的方案了,考虑限制节点数量的方案

@x6-bot
Copy link
Contributor

x6-bot bot commented Feb 17, 2023

🎉 This PR is included in the following release 🎉

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info PR: merged PR has merged. released PR has released size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat:support react 17 and react18 in x6-react-shape
3 participants