Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@restart/hooks

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/hooks - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

4

cjs/useIntersectionObserver.js

@@ -32,3 +32,3 @@ "use strict";

var observer = (0, _useStableMemo.useStableMemo)(function () {
return new IntersectionObserver(setEntry, {
return typeof IntersectionObserver !== 'undefined' && new IntersectionObserver(setEntry, {
threshold: threshold,

@@ -40,3 +40,3 @@ root: root,

(0, _useIsomorphicEffect.default)(function () {
if (!element) return;
if (!element || !observer) return;
observer.observe(element);

@@ -43,0 +43,0 @@ return function () {

@@ -23,3 +23,3 @@ import { useState } from 'react';

var observer = useStableMemo(function () {
return new IntersectionObserver(setEntry, {
return typeof IntersectionObserver !== 'undefined' && new IntersectionObserver(setEntry, {
threshold: threshold,

@@ -31,3 +31,3 @@ root: root,

useEffect(function () {
if (!element) return;
if (!element || !observer) return;
observer.observe(element);

@@ -34,0 +34,0 @@ return function () {

{
"name": "@restart/hooks",
"version": "0.3.3",
"version": "0.3.4",
"main": "cjs/index.js",

@@ -5,0 +5,0 @@ "types": "cjs/index.d.ts",

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