Closed Wendenburg closed 3 years ago
using useSize I get the following error in a Typescript setup: Object(...) is not a function
const imageRef = useRef(null); const [width, height] = useSize(imageRef); return <img ref={imageRef} srcSet={`${src} 1x`} src={src} />;
There should be no error
adding the line with useSize results in the above error, without everything is working
Not sure if this works properly:
React: 16.3.1, web-api-hooks: "^3.0.2",
found my mistake, my bad, all good!
Thanks for closing this issue. I’m glad that you could fix it 😊
Description
using useSize I get the following error in a Typescript setup: Object(...) is not a function
Reproduction
Expected behavior
There should be no error
Actual behavior
adding the line with useSize results in the above error, without everything is working
Environment
Not sure if this works properly:
System:
Binaries:
Browsers:
React: 16.3.1, web-api-hooks: "^3.0.2",