useDimensions
useDimensions copied to clipboard
Missing typings
Hey Swizec,
This useDimensions hook looks nice, but the typescript typings is not in the code when I get it from NPM, and its not in @types/react-use-dimensions either.
But I can see in your source code that you have created it with typings.
I it possible that you can add the typings so it can be used in "strict" typescript projects?
(I believe its adding "typing:ref to file" in the package.json or something like that)
/br
I have opened a PR (#17) which should resolve this issue.
As @alfnielsen said, typing property was missing in package.json
. In addition, some extra work has been required adapting some interfaces that could cause problems in "strict" Typescript projects. More details are explained in the PR.