This website uses cookies to ensure you get the best experience on our website.

Skip to content
LOGO
  • Company

    About IGNEK

    Learn about our story and our mission.

    Careers

    We're hiring!

    We always looking for talented peoples. Join our team!

    Blogs

    The latest industry news, updates and info.

    Case Studies

    Take a closer look at the projects we've delivered

    Webinar

    Watch our latest organized webinar

    Get in touch with our HR team

    • hr@ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Custom Enterprise Portal Development for flawless Solutions

    Dedicated Development Team

    Expand Teams, Optimize Development with Our Expertise

    Back-end Development

    Empowering your digital presence with robust backend development expertise

    Front-end Development

    Crafting engaging user experiences through expert frontend development

    Digital Transformation

    Embrace digital transformation by modernizing process

    SaaS Development

    Transform your business with SaaS Innovative Solutions

    Technologies

    Liferay Services

    Development & Customization

    Theme

    Upgradation

    Migration

    Proof of Concept

    Performance Tunning

    Architecture

    Support & Maintenance

    E-commerce

    Expert Advice

    React Services

    Enterprise Development

    Custom Application

    Single Page Application

    Architecture

    API Integration

    Migration

    Consulting

    Maintenance & Support

    Spring Boot Services

    Web Service

    MVC Web Development

    API Integration

    Security

    Migration

    Microservices

    Support & Maintenance

    AEM Services

    Consulting Service

    Site Development

    Migration & Upgradation

    Integration

    Maintenance & Support

    Custom Solutions

    Content Management

    Team Augementation

  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Transforming industries through cutting edge SaaS solutions.

    Customer Portal : Boost Business Productivity

    Streamline operations and enhance productivity with our Customer Portal solution.

    Liferay Based Intranet Portal

    Internal portal for company communication, collaboration and resources

    Integration

    Matomo Integration with Liferay

    Integrate Matomo to enable user interactions seamlessly.

    Microsoft Teams integration with Liferay

    Integrate to enable seamless collaboration, messaging within your portal.

    Jira Integration With Liferay

    Optimizes business operations by integrating with Jira.

  • Hire Us

    Liferay

    Get expert Liferay developers for seamless portal solutions.

    React JS

    Get expert ReactJS developers for dynamic web solutions.

    Web Developer

    Get custom web solutions from IGNEK's expert developers.

    Spring Boot

    Get top-notch Spring Boot developers for your project success!

    Healthcare

    Get top Healthcare Developers for cutting-edge medical software.

    MERN Stack

    Get expert MERN developers from IGNEK for custom, innovative project solutions.

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@ignek.com
    • +91 6351576580
    • info@ignek.com
    • Ahmedabad, Gujarat, India – 382470
SCHEDULE CALL
  • COMPANY
    • About
    • Case Studies
    • Blogs
    • Career
    • Webinar
  • SERVICES
    • Enterprise Portal Development
    • Dedicated Development Team
    • Back-end Development
    • Front-end Development
    • Digital Transformation
    • SaaS Development
  • SOLUTION
    • Customer Portal:  Boost Business Productivity
    • SaaS : Software as a Service
    • Liferay Based Employee Intranet Portal
  • TECHNOLOGY
    • Liferay Services
      • Liferay Development and Customization
      • Liferay Theme Development Service
      • Liferay DXP 7.4 Upgrade
      • Liferay Migration
      • Liferay Proof Of Concept
      • Liferay Performance Tuning
      • Liferay Architecture Design Service
      • Liferay Support And Maintenance Service
      • Liferay Ecommerce Development
      • Liferay Expert Advice
    • ReactJS Services
      • ReactJS Enterprise Application Development
      • ReactJS Custom Application Development
      • ReactJS Single Page Application Development (SPA)
      • ReactJS Applications Architecture
      • ReactJS API Integration
      • ReactJS Migration
      • ReactJS Consulting
      • ReactJS Maintenance and Support
    • Spring Boot Services
      • Spring Boot Web Development Service
      • Spring MVC Web Development
      • Spring Boot API Integration Service
      • Spring Boot Security
      • Spring Boot Migration Service
      • Spring Boot Microservices
      • Spring Boot Support & Maintenance Service
    • AEM Development Services
      • AEM Consulting Services
      • AEM Site Development
      • AEM Migration & Upgradation
      • AEM Integration Services
      • AEM Maintenance & Support
      • AEM Content Management
      • Custom AEM Solutions
      • AEM Team Augmentation
  • INTEGRATION
  • HIRE US
    • Hire Liferay Developer
    • Hire ReactJS Developer
    • Hire Spring Boot Developer
    • Hire Healthcare Developer
    • Hire Web Developer
    • Hire MERN Stack Developer
  • CONTACT US
  • Company

    About IGNEK

    Careers

    We're hiring!

    Blogs

    Case Studies

    Webinar

    Get in touch with our HR team

    • hr@ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Dedicated Development Team

    Back-end Development

    Front-end Development

    Digital Transformation

    SaaS Development

    Technologies

    Liferay Liferay Services
    • Development & Customization
    • Theme
    • Upgradation
    • Migration
    • Proof of Concept
    • Performance Tuning
    • Architecture
    • Support & Maintenance
    • E-commerce
    • Expert Advice
    React React Services
    • Enterprise Development
    • Custom Application
    • Single Page Application
    • Architecture
    • API Integration
    • Migration
    • Consulting
    • Maintenance & Support
    Spring Boot Spring Boot Services
    • Web Service
    • MVC Web Development
    • API Integration
    • Security
    • Migration
    • Microservices
    • Support & Maintenance
    AEM AEM Services
    • Consulting Service
    • Site Development
    • Migration & Upgradation
    • Integration
    • Maintenance & Support
    • Custom Solutions
    • Content Management
    • Team Augmentation
  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Customer Portal : Boost Business Productivity

    Liferay Based Intranet Portal

    Integration

    Matomo Integration with Liferay

    Microsoft Teams integration with Liferay

    Jira Integration With Liferay

  • Hire Us

    Liferay

    React JS

    Web Developer

    Spring Boot

    Healthcare

    MERN Stack

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@ignek.com
    • +91 6351576580
    • IGNEK
    • Ahmedabad, Gujarat, India – 382470
  • SCHEDULE CALL

How to virtualize large lists using React-Window

  • ReactJS
  • June 25, 2025

Share On :

Introduction:

A usual difficulty with React is ensuring that large lists are displayed effectively. Showing thousands of products, customers, transactions, or logs using large numbers of DOM nodes will slow down your application.

It’s easy to render lists in React, but it isn’t automatically built to handle many users at once. This problem is solved using virtualization. When an application virtualizes, only things you can see are processed, which reduces both the time needed for loading and for scrolling.

In this article, we’ll dive into react-window, a slim library developed by Brian Vaughn that helps make virtual lists easy to use.

Prerequisites:
  • Node.js and npm

  • React

  • Typescript

  • Array manipulation and rendering lists

  • Basic CSS for layout

What Is Virtualization?

Windowing (often called virtualization) means showing only what is displayed on the screen and not all entries on the list. As opposed to showing all 10,000 items on the page, a virtualized list loads the ones that can be seen by the user into the screen.

As you scan down the page, things coming into view are added to the DOM, and those leaving the display are removed. This results in scarce memory use and greater performance.

If you picture a window (that’s where the name comes from!), You’d only see a few parts even though lots more exist beyond it.

Why react-window?

Some virtualization libraries can be found in the React ecosystem, for instance react-virtualized and react-infinite-scroll. React-window is notable for some important reasons.

  • You will only need 2KB of space after everything is gzipped.

  • Tailored for speed since performance matters most in extensive user interfaces. 

  • Anyone can easily master how to use and link the API.

  • A wide range of layouts : Vertical, horizontal and grid lists are supported.

  • Vaughn is with the React core team and also wrote react-virtualized.

With react-window, we only show the user what they can see, making the app faster and more responsive.

How react-window work?

The main idea behind react-window is actually quite easy to understand :

  1. You choose both the number of elements you want and how much space they will require (in pixels).

  2. Set the height (or width) of the list container in view.

  3. It uses the position of the screen to determine what is currently visible in the Library.

  4. It only adds to the DOM those items it has already identified.

  5. Oftentimes, the things you don’t see are also hidden from the document—not in the DOM.

We use virtualization in the library for the following :

  • Vertical lists

  • Horizontal lists

  • Systems using rows and columns

  • End-user lists that either have fixed sizes or allow for items of different sizes

Frontend Setup in React : 

We’ll write the code to get a better understanding of React code patterns :

Step-by-step Implementation

Step-1 : Create a React App

Let’s create a React app using the following command :

				
					//Create a react app using the following command

npx create-react-app react-code-pattern --template typescript react-window
				
			

After the setup is complete, navigate to your project folder :

				
					// Navigate to the project folder
 cd virtualize-large-lists-app
 npm start
				
			

This will start the development server, and you will be able to visit the app at http://localhost:3000.

Step-2 : Project Structure :

Make sure your project has the following folder structure:

Image1 | How to virtualize large lists using React-Window

Step-3 : Virtualize large lists using react-window Example:

				
					// components/VirtualizedList.tsx

import React from "react";
import { FixedSizeList as List } from "react-window";
import { generateData } from '../utils/data';
const data = generateData(10000);
const Row = ({ index, style }: { index: number; style: React.CSSProperties }) => {
  const item = data[index];
  return (
    <div style={style} className="row">
      <strong>{item.name}</strong> - {item.email}
    </div>
  );
};

const VirtualizedList = () => {
  return (
    <List
      height={800}
      itemCount={data.length}
      itemSize={35}
      width={'100%'}
    >
    {Row}
     </List>
  );
};

export default VirtualizedList;

				
			

React-window’s FixedSizeList provides a virtual list filled with rows of equal height. The generateData function is used to build exactly 10,000 mock users. With react-window, you must style every item, covering positioning and height. We use the index to get the appropriate item from the data array.

The list container will occupy a vertical space of 600px (equal to the viewport) before shrinking.

There are 10,000 items in total:

itemCount={data.length}.

itemSize={35} : Each displayed item stands 35px tall. The full width of the parent container is denoted by a width of 100%.

We use the Row component as a function to display every list item. This means that only the parts in view within the 600px frame which fills approximately 17-18 rows, will be loaded for the DOM, with the others only shown virtually.

				
					// utils/data.ts


export const generateData = (count: number) =>
  Array.from({ length: count }, (_, index) => ({
    id: index,
    name: `User ${index}`,
    email: `user${index}@example.com`,
}));

				
			

generateData(count: number) is a function that creates count mock user objects.

Array.from({ length: count }) : Makes an array containing count undefined elements.

We’re leaving out the first argument (_) which is usually the value. Only the second argument index is needed to make the ID and labels in this example.

Now we will import the VirtualizedList component into the main App.tsx file. This will create the UI renderer for that component.

				
					// App.tsx

import VirtualizedList from "./components/VirtualizedList";
import "./App.css";

function App() {
  return (
    <div className="App">
      <header className="App-header">
        Virtualize large lists using react-window
      </header>

      <VirtualizedList />
    </div>
  );
}

export default App;

				
			
Output :
Image2 | How to virtualize large lists using React-Window
Conclusion:

To build a UI that responds well and is scalable, React relies on virtualization. Used correctly, react-window speeds up rendering and scrolling for a large list.By knowing and using container/presentational separation, custom hooks and React Context in your code, plus virtualization, you can build React apps that are clean, efficient and easy to maintain. Kick off by virtualizing your major processes and then you can expand with assurance.

Explore Our Services

Discover how we can help your business thrive, whether you’re running a small startup, an SME, or a large enterprise. We’re here to understand your unique needs and goals, offering the expertise and resources to support your journey to success.
Stay informed about our ReactJS services and updates by subscribing to our newsletter—just fill in the details below to subscribe.

Loading
Loading...

Related Blogs

November 10, 2023
typescript and react with liferay cover image
TypeScript and React with Liferay
March 27, 2024
ReactJS Performance Tuning
September 13, 2024
Handling Large Data With Infinite Scrolling in React
Handling Large Data With Infinite Scrolling in React
Loading...

Featured Projects Portfolios

November 27, 2023
Government Job Platform User-Friendly, Secure and Scalable
Government Job Platform : User-Friendly, Secure, and Scalable
October 6, 2023
Dynamic E-commerce Platform_for Sales, Rentals and Inventory Management
Dynamic E-commerce Platform for sales, Rentals and Inventory Management
November 29, 2024
Employee Intranet Portal for Government Entity
Employee Intranet Portal for Government Entity

Digital Solutions for Your Business with IGNEK

4.9

5.0

5.0

5.0

LOGO

Making the world a better place through constructing elegant hierarchies

COMPANY

  • About
  • Career
  • Case Study
  • Blogs

SERVICES

  • Enterprise Portal Development
  • Dedicated Development Team
  • Back-end Development
  • Front-end Development
  • Digital Transformation
  • SaaS Development

HIRE US

  • Liferay
  • Spring Boot
  • ReactJS
  • Healthcare
  • MERN Stack
  • AEM

CONTACT

  • info@ignek.com
  • info@ignek.com
SALES
  • sales@ignek.com
  • (+91) 635 157 6580
CAREER
  • hr@ignek.com
  • (+91) 932 849 5160
  • E 910-912, Ganesh Glory 11, Jagatpur Road, SG Highway, Ahmedabad, Gujarat - 382470

© 2018-2025 IGNEK, Inc. All rights reserved

Linkedin Facebook X-twitter Instagram