captivationsoftware/react-sticky

Get rid of `raf` library

darkowic opened this issue · 2 comments

I'm submitting a ...

  • bug report
  • feature request
  • support request

The requestAnimationFrame is now widely supported by browsers -https://caniuse.com/#search=requestanimationframe

The library is using polyfill for it - https://www.npmjs.com/package/raf . Removing the polyfill we could save ~30% of build size https://bundlephobia.com/result?p=react-sticky@6.0.3

vcarl commented

This is a good idea! You're right, I feel fine not supporting older than IE10. I'll see about making this change soon.

moreover raf is required for recent React versions. So it should be actually already polyfilled by lib consumers.