-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes: 1595 - [next] Infinite Scrolling of Posts is broken (All of our infinite scrolls were broken) #1614
Conversation
eslint-disable-next-line react-hooks/exhaustive-deps LINE 45
File: LoadAutoScroll.tsx eslint-disable-next-line react-hooks/exhaustive-deps LINE 48
File: LoadAutoScroll.tsx
@PedroFonsecaDEV : Seem to be a quick fix, good job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -44,12 +44,13 @@ function LoadAutoScroll({ onScroll }: Scroll) { | |||
return () => { | |||
observer.unobserve(buttonRefCopy as HTMLButtonElement); | |||
}; | |||
}, [$buttonRef, onScroll]); | |||
// eslint-disable-next-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should file a follow-up to figure out why our eslint doesn't like []
since I'd say it's a valid use case to not define deps, but want a one-time effect.
…r infinite scrolls were broken) (Seneca-CDOT#1614)
Issue This PR Addresses
Fixes #1595
Type of Change
Description
After landed the PR: #1573 created a bug inside our
LoadAutoScroll
's useEffect both for our Gatsby and Next. This PR will fix the warning issue and fix all of our infinite scroll problems for Gatsby and Next (homepage and search page).Checklist