Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Infinite Scroll in React - Full Tutorial

Dave Gray via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial demonstrates two ways to implement infinite scrolling in React: a custom hook using Axios, useRef, useCallback, and Intersection Observer, and React Query’s useInfiniteQuery. It tests both implementations with paginated post data.

Syllabus

Intro
Welcome
Starter code and dependencies
Axios API setup
usePosts custom hook
Example 1 component
Post component and forwardRef
Applying useRef
Checking functionality
Intersection Observer and useCallback
Testing Infinite Scroll & Query
Example 2: React Query setup
Example 2 component
useInfiniteQuery
Update Example 2 with useInfiniteQuery
Testing Example 2 functionality

Taught by

Dave Gray

Reviews

Start your review of Infinite Scroll in React - Full Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.