React 之 Error: Function components cannot have refs. Did you mean to use React.forwardRef()?解决办法

原因是funtion组件(无状态组件)不能使用refs

删除掉组件内的ref="xxx"

发布了127 篇原创文章 · 获赞 150 · 访问量 48万+

猜你喜欢

转载自blog.csdn.net/qq_40259641/article/details/103289639