Mis notas - Matias Hernández

useRef with Typescript

With crateRef

const myRef = createRef<HTMLDivElement>()

forwardref

type Ref = HTMLButtonElement
const F = forwardRef<Ref, Props>

or

type Ref = React.Ref<HTMLDivElement>

Links to this note