
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
lazy-child
React component that renders its child when it enters the viewport.
yarn add lazy-child
Or
npm install --save lazy-child
import Lazy from 'lazy-child';
function LazyLoadedImageExample() {
return (
<Lazy renderPlaceholder={ref => <img ref={ref} alt="Lazy loaded image" />}>
<img src="example.jpg" alt="Lazy loaded image" />
</Lazy>
);
}
Lazy
children: React.ReactNode
A React element to render when the placeholder enters the viewport.
offsetBottom?: number
Passed to the wrapped react-peekaboo instance.
Number of pixels to add to the bottom of the area checked against when computing in view elements.
Default: 0
offsetLeft?: number
Passed to the wrapped react-peekaboo instance.
Number of pixels to add to the left of the area checked against when computing in view elements.
Default: 0
offsetRight?: number
Passed to the wrapped react-peekaboo instance.
Number of pixels to add to the right of the area checked against when computing in view elements.
Default: 0
offsetTop?: number
Passed to the wrapped react-peekaboo instance.
Number of pixels to add to the top of the area checked against when computing in view elements.
Default: 0
renderPlaceholder: (ref: React.Ref<any>) => React.ReactNode
Render prop that returns a React element to render as a placeholder. The function receives a ref as its first parameter that must be applied to a DOM element.
throttle?: number
Passed to the wrapped react-peekaboo instance.
Number of ms to throttle scroll events (only applies in environments that don't support IntersectionObserver).
Default: 100
FAQs
React component that renders its child when it enters the viewport
The npm package lazy-child receives a total of 4,981 weekly downloads. As such, lazy-child popularity was classified as popular.
We found that lazy-child 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 MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.