1 import { ReactNode, Ref, RefAttributes, forwardRef } from "react"
2
3 export function genericForwardRef<T, P = {}>(
4 render: (props: P, ref: Ref<T>) => ReactNode
5 ): (props: P & RefAttributes<T>) => ReactNode {
6 return forwardRef(render as any) as any
7 }