This article's content
QuickTip: React forwardRef with TypeScript
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>
    );
});

About Author

Mathias Bothe To my job profile

I am Mathias from Heidelberg, Germany. I am a passionate IT freelancer with 15+ years experience in programming, especially in developing web based applications for companies that range from small startups to the big players out there. I create Bosycom and initiated several software projects.