
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
use-size-performant
Advanced tools
React hook to retrieve the size of an element
npm i use-size-performant
// or
yarn add use-size-performant
import useSize from "use-size-performant";
const YourComponent = () => {
const ref = useRef(null);
const { height, width } = useSize(ref);
return (
<div ref={ref}>
<p>Height: {height}</p>
<p>Width: {width}</p>
</div>
);
};
import useSize from "use-size-performant";
const YourComponent = () => {
const dom = document.querySelector('body');
const { height, width } = useSize(dom);
return (
<div>
<p>Height: {height}</p>
<p>Width: {width}</p>
</div>
);
};
MIT © Akshit Kr Nagpal
FAQs
> React hook to retrieve the size of an element
The npm package use-size-performant receives a total of 8 weekly downloads. As such, use-size-performant popularity was classified as not popular.
We found that use-size-performant 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
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.