React Hooks forwardRef useImperativeHandle TypeScript类型 最佳实践
定义官网文档forwardRef:转发refuseImperativeHandle:用于自定义暴露给父组件的实例值版本"react":"^17.0.2""@types/react":"^17.0.44"代码父组件import{FC,useEffect,useRef}from'react';//导入子组件importChildComponent,{IRef}from'./ChildComponent