Open
Description
Sorry but the current readme file required me to spend 20 minutes trying to figure out what's going on and read the source code.
For example: there's no reference to the .observe
or .unobserve
methods (and the first ones seems required to make this working).
A new readme proposal (taken from https://codesandbox.io/s/ko5wqqz617)
let rectObserver = observeRect(node, rect => {
console.log(rect.left, rect.top, rect.height, rect.width);
});
rectObserver.observe();
(also a link to a codesandbox could help)
Metadata
Assignees
Labels
No labels