-
-
Notifications
You must be signed in to change notification settings - Fork 47k
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
⚠️ Some components throw findDOMNode is deprecated and will be removed
in React 18.3 / 19
#48709
Comments
Hello @afc163. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! 你好 @afc163,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 |
findDOMNode is deprecated and will be removed
in React 18.3 / 19findDOMNode is deprecated and will be removed
in React 18.3 / 19
I can confirm this is happening to us as well |
+1 |
1 similar comment
+1 |
+1 |
+10086 |
+1 |
+1111 |
官方有计划修复吗 |
+1 |
升级到5.17.2版本后使用 Menu 组件还是会报这个警告 |
Please provide reproduce and exactly which component will have this error. |
Similar to #48646 |
This may be one of the issues |
能否在4.x版本也修复这个问题? |
锁定 react 版本 18,2.0 就行了 4.x停止维护了 |
Please include the following components too
|
So, if I understand this right, every component from the react-component library that uses findDOMNode is affected, correct? https://github.com/search?q=org%3Areact-component+findDOMNode&type=code |
There are some fixes in #48958. |
Hopefully, they will be released soon! |
5.17.3 was released! Hopefully this is fixed |
While it did fix for a lot of components, still happens on my end, using the Select component. Edit.: Upon further inspection, it's not on the select, It's on the Tooltip component, I just had a function on my code that showed a tooltip depending on the value of another select, like so:
So the Tooltip triggers the warning |
fixed for me using 5.17.3! |
@loqbudokai3, pls feel free to create new issue with reproduce that we can track the problem : ) |
Also fixed for us in 5.17.3. Just as a heads up for people getting the warning anyway: Antd will still fallback to Might be worth to completely remove this fallback behavior, when React 19 is production ready, but for now that's the behavior that I noticed for some components. |
+1 |
+1 |
+1 |
issue reproduction, please. |
Reproduce when I use the Menu component
|
+1 |
1 similar comment
+1 |
What if my component returns null, so it can't have a ref? Example: function App() {
return (
<Tooltip title="test">
<NullComponent />
</Tooltip>
);
}
function NullComponent() {
return null;
} Of course this is synthetic example. But in large applications it is a common thing for a component to early return |
Related links:
Components to fix
FloatButton
最新版本 (5.12.1) 依然报console warning #46326The text was updated successfully, but these errors were encountered: