maslianok / react-resize-detector

A Cross-Browser, Event-based, Element Resize Detection for React
http://maslianok.github.io/react-resize-detector/
MIT License
1.25k stars 91 forks source link

Use the entry field corresponding to the box model #197

Closed kirilldronkin closed 2 years ago

kirilldronkin commented 2 years ago

Hi. I'm trying to use observerOptions added in 6.5 to change the box model of observing, but still get the content box dimensions. Looks like the library should decide which entry field (borderBoxSize, contextBoxSize or devicePixelContentBoxSize) use basing on observerOptions.box. Maybe a good decision would be move box to a separate prop to prevent forgotten memoization of observerOptions and further performance penalty, especially considering the fact that it has the only primitive field.

maslianok commented 2 years ago

I return to work after some pause and closing old issues to keep the repo clean. It would be great if we can discuss your concerns above, so feel free to reopen the issue if you are still around.