-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Hey, thanks for creating such a lightweight/performant library! I think this library could improve on its api slightly to make it easier to use in an application using refs. Instead of returning a ref as the first return value, it would be more flexible if it could be passed in as the first argument to useDimensions:
const containerRef = useRef(null);
const dimensions = useDimensions(containerRef);This would make it easier to work with other libraries, such as useScrolling:
const containerRef = useRef(null);
const dimensions = useDimensions(containerRef);
const scrolling = useScrolling(containerRef);I would be more than happy to make a PR for this change, however, I understand if you wouldn’t want to introduce this change as it would be breaking.
KutnerUri and joshuabaker
Metadata
Metadata
Assignees
Labels
No labels