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

Use Resize Observer?

Open keul opened this issue 4 years ago • 2 comments

This pretty good library carries a not-so-small bundle size change: https://bundlephobia.com/package/[email protected]

It seems this largely depends on the element-resize-detector dependency.

I'm wondering is you ever evaluated a switch to the Resize Observer API for this.

I know this would be a task to defer to element-resize-detector probably, but it seems that the author has a different opinion.

Any thoughts?

keul avatar Jun 22 '21 15:06 keul

Hi @keul;

It's a fair question. I am open to switching to the Resize Observer API, but for now I intend for this package to exist in order support a wider set of browsers. Once the ecosystem has evolved to a point that we no longer need to support older browsers I may update this package or declare it archived. 🙏

sean-tmg avatar Aug 23 '21 07:08 sean-tmg

@sean-tmg I understand the scope to support wider range of browsers! Just a note: there are some Resize Observer polyfills out there, so in case devs could add them if they really need to support older browsers

keul avatar Aug 23 '21 07:08 keul