Skip to content

Commit

Permalink
Merge pull request #207 from czeslaaw/master
Browse files Browse the repository at this point in the history
Observe elementRef.current instead of elementRef in useResizeObserver
  • Loading branch information
antonioru committed Mar 6, 2021
2 parents 375831f + f21c51f commit e3fe58a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useResizeObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const useResizeObserver = (elementRef, debounceTimeout = 100) => {
if (isSupported && elementRef.current) {
observerRef.current.observe(elementRef.current);
}
}, [elementRef]);
}, [elementRef.current]);

return DOMRect;
};
Expand Down

0 comments on commit e3fe58a

Please sign in to comment.