good first issuehelp wanted
Repository-Metriken
- Stars
- (43.979 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 1743T 9h) (1 gemergte PR in 30 T)
Beschreibung
Is your feature request related to a problem? Please describe.
Currently useMeasure returns a ref which needs to be assigned a ref in the JSX.
This has 2 issues:
- The
refis not a realuseReffor eg. Does not haveref.currentas a prop. - If I already have a component where I have a ref, I just want to track its size changes.
Describe the solution you'd like
An API of this shape:
const {width, height ... } = useMeasure({ref: currentRef});
Describe alternatives you've considered
I am using https://github.com/ZeeCoder/use-resize-observer ... in the absence of the above which I want to remove.