An open API service indexing awesome lists of open source software.

https://github.com/lbwa/how-virtual-scroll-works

How virtual scroll works
https://github.com/lbwa/how-virtual-scroll-works

virtual-scroll

Last synced: 4 months ago
JSON representation

How virtual scroll works

Awesome Lists containing this project

README

          

How virtual scroll works

This project is used to describe how virtual scroll works.

- Q: Why we use virtual scroll, instead of normal infinite scroll?

A: Reduce DOM nodes memory usage significantly.

To be notice, there is no sliver bullet. You'd better use virtual scroll if there are thousands of nodes that need to be rendered. Otherwise, normal infinite scroll would be better solution.

## Core

The key is how to calculate visible elements and simulate scrolling virtually.

## License

MIT © [Bowen Liu](https://set.sh)