Skip to content

Please fix the README with some documentation #3

Open
@keul

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions