
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-resize-context
Advanced tools
A high performance React component for responding to resize event
A high performance React component for responding to resize event.
npm install react-resize-context
Provides a { ResizeProvider, ResizeConsumer } pair which just like React's Context API. When renders a context ResizeConsumer, it will listen to the resize event from the children of closest matching ResizeProvider above it in the tree.
A React component that allows
ResizeConsumerto listen to the resize event fromResizeProvider's children element.
It is also a React component that triggers two callback functions when the element is resized. One is
onSizeChangedand the other isupdateDatasetBySize.
interface Size {
width: number;
height: number;
}
interface DOMStringMap {
[name: string]: string | undefined;
}
type onSizeChanged = (size: Size) => void;
type updateDatasetBySize = (size: Size) => DOMStringMap;
updateDatasetBySizeThe return value of updateDatasetBySize is updated to the dataset of the current ResizeConsumer's DOM element, so we can easily update the styles of different sizes through the CSS attribute selectors (eg: [data-size="small"]).
FAQs
A high performance React component for responding to resize event
The npm package react-resize-context receives a total of 459 weekly downloads. As such, react-resize-context popularity was classified as not popular.
We found that react-resize-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.