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

⚠️ Some components throw findDOMNode is deprecated and will be removed in React 18.3 / 19 #48709

Open
7 tasks
afc163 opened this issue Apr 30, 2024 · 23 comments
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. unconfirmed

Comments

@afc163 afc163 pinned this issue Apr 30, 2024
@afc163 afc163 added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Apr 30, 2024
Copy link
Contributor

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,提前感谢和期待您的贡献。

giphy

@1yasa
Copy link

1yasa commented Apr 30, 2024

Button组件在最近的react experimental中报legacyRender错误(点击即报错),这个错误似乎来自于rc-util

https://github.com/react-component/util/blob/b2016407b7b14353f7b209d8a37df875f0dd0f11/src/React/render.ts#L17

截屏2024-04-30 14 13 42

这种写法会存在版本问题(现在react的一些dom方法从react-dom/client导入)。

@afc163 afc163 changed the title Some components throw findDOMNode is deprecated and will be removed in React 18.3 / 19 ⚠️ Some components throw findDOMNode is deprecated and will be removed in React 18.3 / 19 May 1, 2024
@bombillazo
Copy link
Contributor

I can confirm this is happening to us as well

@shamseer-ahammed
Copy link

+1

1 similar comment
@Rising-Pstar
Copy link

+1

@Soskxkakr
Copy link

+1

@jesse996
Copy link

jesse996 commented May 7, 2024

+10086

@wanpan11
Copy link
Contributor

wanpan11 commented May 7, 2024

#48809

@ppjjzz
Copy link

ppjjzz commented May 7, 2024

react-dom/client

Button组件在最近的react experimental中报legacyRender错误(点击即报错),这个错误似乎来自于rc-util

https://github.com/react-component/util/blob/b2016407b7b14353f7b209d8a37df875f0dd0f11/src/React/render.ts#L17

截屏2024-04-30 14 13 42 这种写法会存在版本问题(现在react的一些dom方法从react-dom/client导入)。

这个会导致一些antd组件无法在react 19下使用,例如message

@p-a
Copy link

p-a commented May 8, 2024

+1

@osherasfa
Copy link

+1111

@xiaoxustudio
Copy link

xiaoxustudio commented May 11, 2024

+1

1 similar comment
@pqhuy98
Copy link

pqhuy98 commented May 11, 2024

+1

@zhouccccc
Copy link

any update?

@tahafatih
Copy link

+1

@0fan
Copy link

0fan commented May 13, 2024

官方有计划修复吗

@vtur
Copy link

vtur commented May 14, 2024

+1

@ppjjzz
Copy link

ppjjzz commented May 15, 2024

升级到5.17.2版本后使用 Menu 组件还是会报这个警告

@hiql
Copy link

hiql commented May 15, 2024

这个问题依久很多😮‍💨

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
at SingleObserver (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:1731:24)
at ResizeObserver3 (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:1808:24)
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:21861:34
at Tooltip2 (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:27092:32)
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:27734:16
at MenuItem2 (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:31294:5)
at div
at InheritableContextProvider (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:29565:23)
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:30705:43
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:32537:29
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:32652:45
at div
at aside
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:31079:16
at div
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:63544:16
at Layout
at main
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:63525:16
at Content
at div
at http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:63544:16
at Layout
at NotesPage (http://localhost:7718/app/routes/app.tsx:118:16)
at RenderedRoute (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:404:5)
at Outlet (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:738:26)
at App
at LocaleProvider (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:4192:13)
at MotionWrapper (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:7577:5)
at ProviderChildren (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:7687:5)
at ConfigProvider (http://localhost:7718/node_modules/.vite/deps/antd.js?v=515c6aff:7959:27)
at body
at html
at Layout (http://localhost:7718/app/root.tsx:18:3)
at RenderedRoute (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:404:5)
at RenderErrorBoundary (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:364:5)
at DataRoutes (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:1393:5)
at Router (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:745:15)
at RouterProvider (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:1210:5)
at RemixErrorBoundary (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:3455:5)
at RemixBrowser (http://localhost:7718/node_modules/.vite/deps/@remix-run_react.js?v=515c6aff:4112:46)

@MadCcc
Copy link
Member

MadCcc commented May 15, 2024

Please provide reproduce and exactly which component will have this error.

@yoyo837
Copy link
Contributor

yoyo837 commented May 15, 2024

Similar to #48646

@wanpan11
Copy link
Contributor

@ppjjzz
Copy link

ppjjzz commented May 15, 2024

能否在4.x版本也修复这个问题?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. unconfirmed
Projects
None yet
Development

No branches or pull requests