2024-04-19
2917
#nextjs
Rahul Chhodde
189067
109
Apr 19, 2024 ⋅ 10 min read

Implementing infinite scroll in Next.js with Server Actions

Rahul Chhodde I'm a software developer with over seven years of experience in different web technologies.

Recent posts:

React Libraries For Building Forms And Surveys

React libraries for building forms and surveys

Consider using a React form library to mitigate the challenges of building and managing forms and surveys.

Hussain Arif
Dec 11, 2024 ⋅ 7 min read
Hoppscotch Vs Postman: A Guide To API Testing

Hoppscotch vs. Postman: a guide to open source API testing

In this article, you’ll learn how to set up Hoppscotch and which APIs to test it with. Then we’ll discuss alternatives: OpenAPI DevTools and Postman.

Chigozie Oduah
Dec 10, 2024 ⋅ 5 min read
React Native logo over red background.

Implementing camera functionality in React Native

Learn to migrate from react-native-camera to VisionCamera, manage permissions, optimize performance, and implement advanced features.

Chimezie Innocent
Dec 9, 2024 ⋅ 13 min read
Solid Principles For Javascript

SOLID principles for JavaScript

SOLID principles help us keep code flexible. In this article, we’ll examine all of those principles and their implementation using JavaScript.

Frank Joseph
Dec 5, 2024 ⋅ 10 min read
View all posts

4 Replies to "Implementing infinite scroll in Next.js with Server Actions"

  1. Your infinite scroll is broken. The code with a button works well. The code with intersection observer keeps repeating posts 11 – 20.

    1. Well spotted. The author asked me to send the following along: “I completely missed covering how closures can cause data duplication and be a real pain for the developer. Addressing and fixing the issue, I’ve added some updates to the article and the code. The only change in the code is the addition of one more state variable to the `useEffect` dependency array. Please check back and let me know if you have any more questions.”

Leave a Reply