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

refactor/findDomNode #6805

Closed
wants to merge 2 commits into from
Closed

refactor/findDomNode #6805

wants to merge 2 commits into from

Conversation

Layouwen
Copy link
Member

为了 react19 的适配做准备.
因发现 findDomNode 将不再支持, 所以换了种获取实例的方式.
通过增加一个同层级的 span 获取兄弟节点赋值, 并将 span 设为 display: none.

Copy link
Contributor

github-actions bot commented Dec 29, 2024

Preview is ready

Copy link

Deploying ant-design-mobile with  Cloudflare Pages  Cloudflare Pages

Latest commit: 09f568c
Status: ✅  Deploy successful!
Preview URL: https://ed3fddb8.ant-design-mobile.pages.dev
Branch Preview URL: https://refactor-finddomnode.ant-design-mobile.pages.dev

View logs

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.74%. Comparing base (12ca364) to head (09f568c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6805      +/-   ##
==========================================
+ Coverage   92.72%   92.74%   +0.02%     
==========================================
  Files         335      335              
  Lines        7198     7193       -5     
  Branches     1767     1802      +35     
==========================================
- Hits         6674     6671       -3     
+ Misses        516      514       -2     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Size Change: -101 B (-0.03%)

Total Size: 370 kB

Filename Size Change
./lib/bundle/antd-mobile.compatible.umd.js 198 kB -61 B (-0.03%)
./lib/bundle/antd-mobile.umd.js 152 kB -40 B (-0.03%)
ℹ️ View Unchanged
Filename Size
./lib/bundle/css-vars-patch.css 1.63 kB
./lib/bundle/style.css 18.5 kB

compressed-size-action

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./lib/bundle/antd-mobile.es.js 107.75 KB (-10 B 🔽) 2.2 s (-0.01% 🔽) 136 ms (+60.14% 🔺) 2.3 s

@Layouwen Layouwen requested review from afc163 and zombieJ December 29, 2024 09:20
@@ -1,29 +1,29 @@
import React from 'react'
import type { ReactNode } from 'react'
import { findDOMNode } from 'react-dom'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findDOMNode 是没有替代物的,如果换掉的话是会 break change 的

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findDOMNode 是没有替代物的,如果换掉的话是会 break change 的

好, 那我等大版本规划在看看

@Layouwen Layouwen closed this Dec 30, 2024
@Layouwen Layouwen deleted the refactor/findDomNode branch December 30, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants