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

resize-observer这个库直接使用findDOMNode导致的 #48675

Closed
zhu-hong opened this issue Apr 28, 2024 · 1 comment
Closed

resize-observer这个库直接使用findDOMNode导致的 #48675

zhu-hong opened this issue Apr 28, 2024 · 1 comment

Comments

@zhu-hong
Copy link

          > 原因找到了 antd的基础工具库rc-util使用了findDOMNode,波及到的库应该很多,代码在 https://github.com/react-component/util/blob/master/src/Dom/findDOMNode.ts#L2 react18.3之前在严格模式下使用这个API会报警,react18.3及更新版本,只要程序使用了这个API就会警报

不准确,这个函数只是被调用处用来兜底的,实际逻辑处应该想办法修改逻辑优先使用例如ref等方式获取,问题不在兜底逻辑本身上。

Originally posted by @yoyo837 in #48646 (comment)

Copy link
Contributor

Hello @zhu-hong, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!

你好 @zhu-hong,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant