警告
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 的外面删除<React.StrictMode></React.StrictMode>
标签,
原文作者:匆匆那年_海,博客主页:https://www.jianshu.com/u/910c0667c515
95后前端汉子,爱编程、优秀、聪明、理性、沉稳、智慧的程序猿一枚。