Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Limiting scroll callback frequency

See original GitHub issue

Have you considered limiting the frequency with which _handleScroll is called via requestAnimationFrame + throttling?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

lencionicommented, Aug 15, 2022

See #197 but also just using IntersectionObserver directly or via react-intersection-observer will be a better choice.

babruixcommented, Nov 24, 2021

Just to note, so no one is confused, throttleHandler was removed in

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quick Tip: How to Throttle Scroll Events - SitePoint
One of the perils of listening to scroll events is performance degradation. The browser will execute the callback every single time the user ......
Read more >
Scroll event firing too many times. I only want it to fire a ...
One way to solve this problem is to define a time interval and only process a scroll event once within that time interval....
Read more >
How to develop high performance onScroll event?
Limit the minimum execution interval time of ONSCROLL event. The onscroll event trigger interval time is around 10~20ms when we scrolling ...
Read more >
Performance Basics: Throttling | A Faster Web
Since scroll events, for instance, can fire off at such a high rate, it's critical to make sure that the event handler isn't...
Read more >
scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
The scrolling box scrolls in a smooth fashion using a user-agent-defined timing function over a user-agent-defined period of time. User agents ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found