ReactJS

What is the List Virtualization in React?


If your application starts feeling slow whenever displaying a big list of items, it may be because you are working with lots of elements in the browser. Great news: you can even improve this just by showing you only see right this is called list virtualization!

How It Works?

Virtualization keeps most of the items in a virtual state. They are not ever actually appended to the DOM until they are needed, rather than rendering all the items at once.

Virtualization happens to only cause those items, falling into the visible part of the container to be rendered and allows other unreferenced in DOM.

The library captures scroll events as the user scrolls and determines which items should appear based on where the user scrolled.

On-The-Fly Rendering: When the user scrolls down, items now in view are quickly added to it; those that are no longer in view are removed. Thus the number of rendering is kept low and scrolling is smooth and very efficient.

Advantages and disadvantages:

It indeed makes the performance brighter and reduces the loading time for a very large list. It uses fewer memories but at the same time, It will make your code more complex. 

Conclusion

Summary In a nutshell, list virtualization is a very good extension for React-based applications that work with large datasets. Actually, showing only the items that are currently visible and handling off-screen items properly does indeed help improve performance, resulting in faster load time and smoother scrolling.

 

Ready to transform your business with our technology solutions?   Contact Us today to Leverage Our ReactJS Expertise 

0

React

Related Center Of Excellence