Skip to content

Dependencies are needed #24

Open
Open
@seleckis

Description

@seleckis

Would be great to pass dependencies to this hook. For example, if a div scales with css transform useMeasure does not handle these changes, you need to resize window to get an actual size.

Please check an example: https://codesandbox.io/s/nostalgic-shannon-ckeq4?file=/src/App.js

So, the solution might be, like:

const [ref, size] = useMeasure({ dependencies: [scale] });

Metadata

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