Рет қаралды 19,468
In this video, I try to explain the IntersectionObserver in a real use case: implementing infinite scroll.
📚 Read the article: www.lucaspaganini.com/academy...
🚨 Subscribe to the newsletter: www.lucaspaganini.com/newsletter
📧 Email: me@lucaspaganini.com
🐦 Twitter: / lucaspaganini
📸 Instagram: / lucaspaganini
----------
CHAPTERS
0:00 Short Version
0:57 Introduction
1:54 The Problem with Scroll Events
2:25 Throttling
3:29 Debouncing
4:46 Reinterpreting the Algorithm
5:30 Intersection Observer
6:45 Intersection Margin
7:10 Browser Support
7:20 Intersections with Other Elements
8:04 Angular Directive
8:33 Conclusion
REFERENCES
1. Repository: github.com/LucasPaganini/publ...
2. Debouncing and Throttling Explained by David Corbacho: css-tricks.com/debouncing-thr...
3. Intersection Observer: developer.mozilla.org/en-US/d...
4. Lodash Docs: lodash.com/docs/4.17.15#throttle
5. Intersection Observer Polyfill: www.npmjs.com/package/interse...
6. Angular Utilities Library: www.npmjs.com/package/@lucasp...