会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hsq
首页
新随笔
管理
2022年4月24日
Function components cannot be given refs.Did you mean to use React.forwardRef()?
摘要: 自己定义的React组件Label Label.tsx interface IProps{ ref:any; } const Label = ({ref}:IProps) => { return <div ref={ref}>标签</div> } 希望拿到Label组件的实例. 然而报错:Funct
阅读全文
posted @ 2022-04-24 17:11 胡姐姐
阅读(483)
评论(0)
推荐(0)