New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-intersection-observer-hooks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intersection-observer-hooks

easy to use hook for intersection observers

  • 1.0.0-hotfix-2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

use-intersection-observer

easy to use hook for intersection observers

NPM JavaScript Style Guide

Install

npm i use-intersection-observer

Usage

import * as React from "react";

import { useIntersectionObserver } from "use-intersection-observer";

const Example = () => {
	const { observe } = useIntersectionObserver(entries => {
		for (const entry of entries) {
			// do stuff with each entry
		}
	});

	return (
		<div>
			<ul>
				<li ref={observe}></li>
				<li ref={observe}></li>
				<li ref={observe}></li>
			</ul>
		</div>
	);
};

License

MIT © GypsyDangerous


This hook is created using create-react-hook.

FAQs

Package last updated on 25 Sep 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc