react-hook icon indicating copy to clipboard operation
react-hook copied to clipboard

Support the box options property for `useResizeObserver`

Open noahlaux opened this issue 1 year ago • 0 comments

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/

noahlaux avatar Mar 30 '23 19:03 noahlaux