Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please fix the README with some documentation #3

Open
keul opened this issue Jun 7, 2018 · 0 comments
Open

Please fix the README with some documentation #3

keul opened this issue Jun 7, 2018 · 0 comments

Comments

@keul
Copy link

keul commented Jun 7, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant