Skip to content
R

react-lazy-load

Simple lazy loading component built with react

by loktarFree

#284in UI Libraries
0In stores

Description

react-lazy-load is a React component that defers loading content until it is needed. Its children render when they enter the viewport, so yo…

Highlights

  • Renders children when they enter the viewport
  • Works inside scrolling containers
  • Uses the Intersection Observer API, written in TypeScript
  • Offset and threshold props
  • Requires React 17 or later

Ratings & Reviews

No ratings yet

Be the first to rate react-lazy-load.

People also visit

R

react-lazyload

Lazyload your Component, Image or anything else where the performance matters

UI Libraries
Launch
R

react-on-screen

A wrapper component to track if your react component is visible on screen

UI Libraries
Launch
R

react-visibility-sensor

Sensor component for React that notifies you

UI Libraries
Launch
R

react-lazy-load-image-component

React Component to lazy load images using a HOC to track window scroll position

UI Libraries
Launch
R

react-waypoint

A React component to execute a function whenever you scroll to an element

UI Libraries
Launch
G

gatsby-background-image

Lazy-loading React background-image component

UI Libraries
Launch

react-lazy-load FAQ

What does react-lazy-load do?

It defers loading content in React. Children render only when they enter the viewport, which suits images and other heavy content.

Does it work inside a scrollable div?

Yes. It can be used inside a scrolling container, such as a div with a scrollbar, and the README says the container is found automatically.

How do I load content before it is visible?

Use the offset prop. It works like CSS margin, and a number such as 1000 starts displaying content 1000px before it reaches the viewport.

Which React version does it need?

React 17 or later. Version 4.0 was updated to work with React 18.

What changed in version 4.0?

It switched to the Intersection Observer API, dropped the debounce and throttle options, and replaced the individual offset props with one offset that works like CSS margin.

What are the best react-lazy-load alternatives?

Popular alternatives to react-lazy-load include react-lazyload, react-on-screen and react-visibility-sensor. See all react-lazy-load alternatives

Developer Stuff

Badges