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

react-intersection-loader

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intersection-loader - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

dist/intersection-loader.js

@@ -76,6 +76,7 @@ var __assign = (this && this.__assign) || function () {

import { jsx as _jsx } from "react/jsx-runtime";
import { lazy, useCallback, useLayoutEffect, useRef, useState, } from 'react';
import { lazy, useCallback, useEffect, useLayoutEffect, useRef, useState, } from 'react';
import { LoaderError } from './error';
import { interopDefault } from './interop-default';
import { WithSuspense } from './with-suspense';
var useIsomorphicLayoutEffect = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
/**

@@ -127,3 +128,3 @@ *

}); }, []);
useLayoutEffect(function () {
useIsomorphicLayoutEffect(function () {
if (!('IntersectionObserver' in window)) {

@@ -130,0 +131,0 @@ throw new LoaderError('Intersection observer is not supported');

2

package.json
{
"name": "react-intersection-loader",
"version": "0.1.0",
"version": "0.1.1",
"description": "Load react component lazily when the component is visible",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -14,3 +14,3 @@ # React Intersection Loader

// This is will be imported (lazy loaded) only when the user is about to see it.
// This will be imported (lazy loaded) only when the user is about to see it.
const MyComponent = intersectionLoader(() => import('./MyComponent'));

@@ -17,0 +17,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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