When trying to assign the ref to the ref prop on a div, as in the examples:
Type 'RefObject<HTMLElement>' is not assignable to type 'LegacyRef<HTMLDivElement>'.
Type 'RefObject<HTMLElement>' is not assignable to type 'RefObject<HTMLDivElement>'.
Property 'align' is missing in type 'HTMLElement' but required in type 'HTMLDivElement'.ts(2322)
lib.dom.d.ts(6346, 5): 'align' is declared here.
index.d.ts(96, 9): The expected type comes from property 'ref' which is declared here on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'
When trying to assign the ref to the ref prop on a canvas:
Type 'RefObject<HTMLElement>' is not assignable to type 'LegacyRef<HTMLCanvasElement>'.
Type 'RefObject<HTMLElement>' is not assignable to type 'RefObject<HTMLCanvasElement>'.
Type 'HTMLElement' is missing the following properties from type 'HTMLCanvasElement': height, width, getContext, toBlob, and 2 more.ts(2322)
index.d.ts(96, 9): The expected type comes from property 'ref' which is declared here on type 'DetailedHTMLProps<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>'
When trying to assign the ref to the ref prop on a div, as in the examples:
When trying to assign the ref to the ref prop on a canvas: