
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@rc-component/resize-observer
Advanced tools
Resize observer for React.
https://resize-observer-react-component.vercel.app/
import ResizeObserver from 'rc-resize-observer';
import { render } from 'react-dom';
render(
<ResizeObserver
onResize={() => {
console.log('resized!');
}}
>
<textarea />
</ResizeObserver>,
mountNode,
);
| Property | Type | Default | Description |
|---|---|---|---|
| disabled | boolean | false | |
| onResize | ({ width, height }) => void | - | Trigger when child node resized |
npm install
npm start
rc-resize-observer is released under the MIT license.
resize-observer-polyfill is a polyfill for the ResizeObserver API, which is a native browser API for observing changes to element sizes. Unlike @rc-component/resize-observer, which is a React-specific implementation, resize-observer-polyfill can be used in any JavaScript environment to provide similar functionality.
react-resize-detector is another React component for detecting element resizes. It offers similar functionality to @rc-component/resize-observer but includes additional features like debounce and throttle options for the resize event, which can help optimize performance in certain scenarios.
react-sizeme is a higher-order component that provides size information to wrapped components. It is similar to @rc-component/resize-observer in that it helps manage responsive design, but it focuses on providing size data as props to components, allowing for more declarative size handling.
FAQs
Resize observer for React
We found that @rc-component/resize-observer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.