react中使用antd警告:findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Wav...

警告

findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Wave which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node

原因:

react中的react严格模式: StrictMode,养鹅模式不支持findDOMNode

解决办法:

index.js挂载 App 的外面删除标签,

原文作者:匆匆那年_海,博客主页:https://www.jianshu.com/u/910c0667c515
95后前端汉子,爱编程、优秀、聪明、理性、沉稳、智慧的程序猿一枚。

你可能感兴趣的:(react中使用antd警告:findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Wav...)