DEV Community

Cover image for Vanilla JavaScript Infinite Scroll using WordPress REST API
Cadu de Castro Alves
Cadu de Castro Alves

Posted on

Vanilla JavaScript Infinite Scroll using WordPress REST API

This pen is a real example of how to build an Infinite Scroll in Vanilla JavaScript. I've used Fetch API, Intersection Observer API, and WordPress REST API to fetch posts. Feel free to fork, use, and modify this code.

Discussion (0)