Error: Function components cannot have string refs. We recommend using useRef() instead.

报这个错误是因为,在无状态函数组件中使用了  ref  ,解决方法去掉        ref,或者将函数组件换成类组件

posted @ 2020-05-21 14:42  养猪至富  阅读(2086)  评论(0)    收藏  举报