QuickTip: React forwardRef with TypeScript
![](https://bothe.at/wp-content/themes/bothe/img/icons/react.png)
import {HTMLAttributes, FC, forwardRef} from 'react' interface Props extends HTMLAttributes<HTMLDivElement> { } export const PageCover = forwardRef<HTMLDivElement, Props>((props, ref) => { return ( <div ref={ref}> <h2>{props.children}</h2> </div> ); });