No overload matches this call.
Overload 1 of 2, '(props: SharedImgixAndSourceProps | Readonly<SharedImgixAndSourceProps>): Imgix', gave the following error.
Type 'RefObject<HTMLImageElement>' is not assignable to type 'string'.
Overload 2 of 2, '(props: SharedImgixAndSourceProps, context: any): Imgix', gave the following error.
Type 'RefObject<HTMLImageElement>' is not assignable to type 'string'.
No overload matches this call.
Overload 1 of 2, '(props: SharedImgixAndSourceProps | Readonly<SharedImgixAndSourceProps>): Imgix', gave the following error.
Type 'RefCallback<HTMLImageElement>' is not assignable to type 'string'.
Overload 2 of 2, '(props: SharedImgixAndSourceProps, context: any): Imgix', gave the following error.
Type 'RefCallback<HTMLImageElement>' is not assignable to type 'string'.
I wonder if something is wrong with the types or implementation, or if I'm doing something wrong.
In the docs it says I can attach a ref to the DOM element like this:
Here's what I'm doing, boiled down to the simplest case:
TS complains:
If I pass the ref I actually want to pass, which is a RefCallback, I get a different error:
I wonder if something is wrong with the types or implementation, or if I'm doing something wrong.