函数: forwardRef()
forwardRef<
T,P= { }>(render:ForwardRefRenderFunction<T,PropsWithoutRef<P>>):ForwardRefExoticComponent<PropsWithoutRef<P> &RefAttributes<T>>
让你的组件通过 ref 向父组件 暴露一个 DOM 节点。
类型参数
参数
返回
ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>