Skip to content

Support the box options property for useResizeObserver #298

Description

@noahlaux

Is your feature request related to a problem? Please describe.
I'd like to be able to utilize the different resizing models for pixel perfect measuring

Describe the solution you'd like
I'd like to be able to provide options to the resize observer upon creation

It could be done fx by providing a third parameter:

useResizeObserver(target, (entry) => setSize(entry.contentRect), { box: ['device-pixel-content-box']} );

Describe alternatives you've considered
N/A

Additional context
https://web.dev/device-pixel-content-box/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions