React Resize Observer Component
JSON →rc-resize-observer is a React component that provides a declarative way to observe changes in the dimensions of its child elements, leveraging the browser's native `ResizeObserver` API. This package, currently at its last stable version `1.4.3`, wraps the observer logic, offering a simple `onResize` prop to receive `width` and `height` updates. Active development and new features, including a `useResizeObserver` hook, have since migrated to the successor scoped package, `@rc-component/resize-observer`, which is currently at version `1.1.2`. While `rc-resize-observer` remains functional for existing applications, new projects are strongly encouraged to use the `@rc-component/resize-observer` package for ongoing support and enhancements. It aims to offer efficient, non-blocking size monitoring without polling.
Traffic · last 30 days ↓64% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France