当前位置: 首页 > news >正文

React Antd or Antd Pro:findDOMNode is deprecated and will be removed in the next major release.

(旧项目)我一开始用的react:18.3.0, antd:5.21.1, ant-design/pro-components:2.7.19
(1)antd更新日志关于修复这个问题的最新一版是在2024/05/19的5.17.3版本(查询于2025/09/12)
而且也是部分修复
antd更新日志:https://ant-design.antgroup.com/changelog-cn
QQ截图20250912172151
(2)在 ProComponents 更新日志中,暂时没有看到有关 findDOMNode 修复的内容(可能我漏看)
antd pro components更新日志:https://procomponents.ant.design/changelog
(3)最终解决办法:查了很多帖子,都是把严格模式去掉,但我不想去掉(捂脸)。所以选择了把react:18.3.0降低到react:18.2.0去解决这个问题
  查的帖子:
  • 在使用React 18.3.0 或者React 19 Beta版本时, Menu组件都会报findDOMNode is deprecated and will be removed错误:https://github.com/ant-design/ant-design/issues/48646
  • 使用ProTable控制台的警告怎么去掉啊!!!!看着膈应人:https://github.com/ant-design/pro-components/issues/8641
  • findDOMNode is deprecated in StrictMode.:https://github.com/ant-design/pro-components/issues/6556
  • Ant Design Pro 6.0 报警告 Warning: findDOMNode is deprecated and will be removed in the next major release. :https://github.com/ant-design/ant-design-pro/issues/11226
(4)出现这个问题的原因,可以看以下两个帖子
  • 官方的:https://18.react.dev/reference/react-dom/findDOMNode
  • React开发揭秘:揭秘findDOMNode消失之谜,告别找节点烦恼!:https://www.oryoy.com/news/react-kai-fa-jie-mi-jie-mi-finddomnode-xiao-shi-zhi-mi-gao-bie-zhao-jie-dian-fan-nao.html
http://www.wxhsa.cn/company.asp?id=2148

相关文章:

  • 单板挑战4路YOLOv8!米尔瑞芯微RK3576开发板性能实测
  • doms.ul.querySelectorvs document.querySelector:DOM查询的层级关系
  • 穿越钱塘江:一条高铁隧道背后的技术挑战
  • Pwn2Own Automotive 2025 决赛日:49个零日漏洞与88万美元奖金揭晓
  • 9.HPA与VPA
  • MyEMS在行动:揭秘开源能源管理系统如何重塑工业与楼宇的能效未来
  • 题解:P14015 [ICPC 2024 Nanjing R] 生日礼物
  • 吻得太逼真
  • HyperWorks许可回收机制
  • flink on k8s的基本介绍
  • 高性能计算基础
  • flutter开发window打包成exe可执行文件的步骤
  • Transtion动画组件要求包裹元素必须是单一根节点
  • linux启动ntp服务
  • 企业级 AI Agent 开发指南:基于函数计算 FC Sandbox 方案实现类 Chat Coding AI Agent
  • android开发局域网内通过NTP服务端自动更新系统时间
  • 一招解决Proxmox VE虚拟机磁盘空间耗尽:LVM在线扩容实战 - 若
  • jiaozi
  • 基于Linux系统的定制软件安装硬件设备选型指南
  • c++之is_trivially_default_constructible
  • python3协程学习-async,await
  • 猫树分治
  • Rust太难了。。。。。。。
  • AI导航生成寻路点-FindPathToLocationSynchronously
  • cache写策略
  • 个人微信开发
  • C++之std::is_trivially_copyable
  • PostgreSQL技术大讲堂 - 第104讲:PostgreSQL分区表应用实践
  • redis实现缓存1-添加商户缓存
  • qemu的外部快照实现原理