Building An Infinite Scroll Using React Hooks

Written by lmaldonadoch | Published 2020/07/31
Tech Story Tags: react | react-hook | infinite-scrolling | web-development | javascript | react-redux | microverse | frontend

TLDR React Hooks are a game-changer for frontend development. It is so easy to work with the lifecycle of components that it blows your mind, so it just makes sense to go this way even if that means you won't be able to use some packages that would make your life a little bit easier. The first thing that we will need is to add an event listener to the window of "scroll" that will then call a handleScroll function. Next, we need a function to calculate whether or not we are at the bottom of the page.via the TL;DR App

no story

Written by lmaldonadoch | www.lmaldonadoch.com
Published by HackerNoon on 2020/07/31