[Feature Request] useSize() `options` support
ResizeObserver.observe() has options https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe , but that's not configurable from useSize() currently.
My usecase is using border-box option.
It's a great suggestion, we'll add it in the future version.
It's a great suggestion, we'll add it in the future version.
ahooks relies on the resize-observer-polyfill package, but the author of resize-observer-polyfill hasn't maintained it for a long time, so it doesn't support the options parameter for observe(). I'm wondering if there's an alternative solution, such as using @juggle/resize-observer.
It's a great suggestion, we'll add it in the future version.
ahooks relies(依赖) on the
resize-observer-polyfillpackage, but the author ofresize-observer-polyfillhasn't maintained(保持) it for a long time, so it doesn't support theoptionsparameter forobserve(). I'm wondering if there's an alternative(替代品) solution, such as using@juggle/resize-observer.
但这是一个Break change。原因是resize-observer-polyfill这个库在计算时,是 content width + padding。
但这是一个Break change。原因是
resize-observer-polyfill这个库在计算时,是 content width + padding。
这俩个库哪个是按照规范来的呢?
我看到 @juggle/resize-observer 是按照最新的规范来的,但是其 READMD 注明了最新的规范还没完成:
但这是一个Break change。原因是
resize-observer-polyfill这个库在计算时,是 content width + padding。这俩个库哪个是按照规范来的呢?
我看到
@juggle/resize-observer是按照最新的规范来的,但是其 READMD 注明了最新的规范还没完成:
如果按照MDN当前定义的规范的话,@juggle/resize-observer 是符合规范来的。至少是支持options选项的。
如果按照MDN当前定义的规范的话,@juggle/resize-observer 是符合规范来的。至少是支持options选项的。
Get! 感谢你提供的参考建议~
