-
-
Notifications
You must be signed in to change notification settings - Fork 49.8k
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: React 17 findDOMNode is deprecated #27755
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 24c5a31:
|
Codecov Report
@@ Coverage Diff @@
## master #27755 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 390 390
Lines 7387 7393 +6
Branches 2042 2044 +2
=========================================
+ Hits 7387 7393 +6
Continue to review full report at Codecov.
|
Please merge |
Please Merge. "findDOMNode" warning is really annoying. |
Could you help to use https://github.com/react-component/util/blob/master/src/ref.ts |
Done. |
used supportRef |
I removed setAndForwardRef and used composeRef instead |
Fixed for me with release 4.8.4 ! |
I am receiving this error on 4.9.4 using Upload component. It is the only component in use as I'm just getting started on this project. My code:
with a very few changes, it is exactly the example from the docs: https://ant.design/components/upload/#components-upload-demo-upload-png-only The above code results in
in the browser console with additional spam. |
Still receiving this error @4.10.0 |
I still have issues with 4.10.2. |
Still have the same issue with 4.11.2 |
same issue on : |
trace in #26136 |
Still have the same issue with 4.12.3 and library version 17.0.1 when i used Menu component |
Hi, the problem is still present with antd 4.15.0 and react 17.0.2 when I use the Menu component. |
Hi, any updates? |
any updates ? |
I get same error on Menu component, any update? |
still happens when using the Menu component with 5.3.0 |
2024年了当前是5.16.5版本使用Button组件依旧会出现警告:react-dom.development.js:86 Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node |
I get this on antd version |
[中文版模板 / Chinese template]
findDOMNode is Deprecated we should use ref.
🤔 This is a ...
🔗 Related issue link
close #22493
ref #26136
💡 Background and solution
Use ref instead of findDOMNode
📝 Changelog
☑️ Self Check before Merge