🌐
GitHub
github.com › RyanNerd › react-new-improved-window
GitHub - RyanNerd/react-new-improved-window: React New and Improved Window popup using the window.open API
Center popups according to the parent window or screen. No external dependencies Only React 16 or 17 as a peer dependency. Codebase has been rewritten in TypeScript with many bugs discovered and fixed in the process. Codebase uses React hooks making react-new-improved-window functionally declarative.
Starred by 15 users
Forked by 2 users
Languages   TypeScript 50.3% | JavaScript 41.3% | HTML 6.9% | CSS 1.5% | TypeScript 50.3% | JavaScript 41.3% | HTML 6.9% | CSS 1.5%
🌐
npm
npmjs.com › package › react-new-improved-window
react-new-improved-window - npm
June 7, 2022 - React component to invoke a new window. Latest version: 0.2.9, last published: 2 years ago. Start using react-new-improved-window in your project by running `npm i react-new-improved-window`. There are no other projects in the npm registry using ...
      » npm install react-new-improved-window
    
Published   Jun 07, 2022
Version   0.2.9
Author   Ryan Jentzsch
Discussions

Using react-window - is this good and performant code?
You'd better use @tanstack/virtual, it's far better and up to date and supports sticky headers. More on reddit.com
🌐 r/reactjs
4
11
February 13, 2025
Open a component in new window on a click in react
I have a component which displays a data. I have to open this component in a new window on clicking a button/ link from a parent component. export default class Parent extends Component { More on stackoverflow.com
🌐 stackoverflow.com
reactjs - How to get the reference for new window object from a Component which opens the window? - Stack Overflow
I forked new-window creating new-improved-window (that uses React hooks and is written in TypeScript) 2021-10-11T11:56:21.457Z+00:00 More on stackoverflow.com
🌐 stackoverflow.com
react-window v2.0 is out 🥳
I wasn’t a fan of how v1 effectively became abandoned for many years and thus moved to tanstack virtual. What would you say to someone like me to consider using react-window in my next project over tanstack virtual with this in mind? More on reddit.com
🌐 r/reactjs
93
139
August 28, 2025
People also ask

Is react-new-improved-window safe to use?
The npm package react-new-improved-window was scanned for · known vulnerabilities and missing license, and no issues were · found. Thus the package was deemed as · safe to use. See the full · health analysis review.
🌐
snyk.io
snyk.io › advisor › javascript packages › react-new-improved-window
react-new-improved-window - npm package | Snyk
Is react-new-improved-window well maintained?
We found indications that react-new-improved-window is an · Inactive project. See the full · package health analysis · to learn more about the package maintenance status.
🌐
snyk.io
snyk.io › advisor › javascript packages › react-new-improved-window
react-new-improved-window - npm package | Snyk
🌐
Snyk
snyk.io › advisor › javascript packages › react-new-improved-window
react-new-improved-window - npm package | Snyk
If the title property is missing the new window will use the parent window's title. The features property no longer require height and width if not given and the center property is set then this will default to height: 600, width: 640. Note: Internet Explorer will no longer be supported. ... import React from 'react' import NewImprovedWindow from 'react-new-improved-window' const Demo = () =&gt; ( <h1>Hi 👋</h1> )
🌐
GitHub
github.com › RyanNerd › react-new-improved-window › blob › c7204b5f7fbff744996e7ff4fc527d157215f30b › LICENSE.md
react-new-improved-window/LICENSE.md at c7204b5f7fbff744996e7ff4fc527d157215f30b · RyanNerd/react-new-improved-window
React New and Improved Window popup using the window.open API - react-new-improved-window/LICENSE.md at c7204b5f7fbff744996e7ff4fc527d157215f30b · RyanNerd/react-new-improved-window
Author   RyanNerd
🌐
GitHub
github.com › RyanNerd › react-new-improved-window › issues
RyanNerd/react-new-improved-window
React New and Improved Window popup using the window.open API - RyanNerd/react-new-improved-window
Author   RyanNerd
🌐
GitHub
github.com › rmariuzzo › react-new-window
GitHub - rmariuzzo/react-new-window: 🔲 Pop new windows in React, using `window.open`.
Center popups according to the parent window or screen. ... import React from 'react' import NewWindow from 'react-new-window' const Demo = () => ( <NewWindow> <h1>Hi 👋</h1> </NewWindow> )
Starred by 464 users
Forked by 108 users
Languages   JavaScript 98.4% | HTML 1.6%
Find elsewhere
🌐
npm
npmjs.com › package › react-new-window
react-new-window - npm
November 27, 2022 - Pop a new window in React, using window.open API. Latest version: 1.0.1, last published: 3 years ago. Start using react-new-window in your project by running `npm i react-new-window`. There are 25 other projects in the npm registry using react-new-window.
      » npm install react-new-window
    
Published   Nov 27, 2022
Version   1.0.1
Author   Rubens Mariuzzo
🌐
Reddit
reddit.com › r/reactjs › using react-window - is this good and performant code?
r/reactjs on Reddit: Using react-window - is this good and performant code?
February 13, 2025 -

I am building an application that displays a very long list of data - think a Spotify-style playlist with 10,000+ rows, each with several columns and unique thumbnail images.

I've come across react-window to improve performance, as this only renders the rows in view rather than all 10k.

However, by default it doesn't support sticky rows, and what I want is a header, a sticky row, and then my list rows, all within a single scrolling container.

I started from their official demo, here.

I've now modified this to get it working the way I want.

But there's an awful lot of re-renders happening, and I'm not confident my code is performant.

Can this codesandbox be improved upon for better performance? And is this good code in general?

https://codesandbox.io/p/sandbox/react-window-with-sticky-headers-chp6dx

I've created a generic StickyList component, and my more specific MyList component that passes the content down to it.

Many thanks for any help!

EDIT:

Following advice in the comments, I've rewritten the demo using Tanstack Virtual. It seems clearer and easier to control and manage!

https://codesandbox.io/p/devbox/suspicious-wildflower-4prdcj?workspaceId=ws_4XrM7ka75TBJaLftpJJK6R

🌐
npm
npmjs.com › package › react-window
react-window - npm
February 13, 2026 - Documentation for this project is available at react-window.vercel.app; version 1.x documentation can be found at react-window-v1.vercel.app.
      » npm install react-window
    
Published   Feb 13, 2026
Version   2.2.7
Author   Brian Vaughn
🌐
GitHub
github.com › bvaughn › react-window › blob › main › CHANGELOG.md
react-window/CHANGELOG.md at main · bvaughn/react-window
January 4, 2026 - The return type of rowComponent and cellComponent changed from ReactNode to ReactElement. This was done to fix TypeScript warnings for React versions 18.0 - 18.2. (See issue #875) Fix possible scroll-jump scenario with useDynamicRowHeight · Support for dynamic row heights via new useDynamicRowHeight hook.
Author   bvaughn
Top answer
1 of 7
35

You can use ReactDOM.createPortal to render a component in a new window as David Gilbertson explains in his post:

class MyWindowPortal extends React.PureComponent {
  constructor(props) {
    super(props);
    // STEP 1: create a container <div>
    this.containerEl = document.createElement('div');
    this.externalWindow = null;
  }
  
  render() {
    // STEP 2: append props.children to the container <div> that isn't mounted anywhere yet
    return ReactDOM.createPortal(this.props.children, this.containerEl);
  }

  componentDidMount() {
    // STEP 3: open a new browser window and store a reference to it
    this.externalWindow = window.open('', '', 'width=600,height=400,left=200,top=200');

    // STEP 4: append the container <div> (that has props.children appended to it) to the body of the new window
    this.externalWindow.document.body.appendChild(this.containerEl);
  }

  componentWillUnmount() {
    // STEP 5: This will fire when this.state.showWindowPortal in the parent component becomes false
    // So we tidy up by closing the window
    this.externalWindow.close();
  }
}
2 of 7
33

The upvoted answer works great!

Just leaving a function component version here in case people are searching for that in the future.

const RenderInWindow = (props) => {
  const [container, setContainer] = useState(null);
  const newWindow = useRef(null);

  useEffect(() => {
    // Create container element on client-side
    setContainer(document.createElement("div"));
  }, []);

  useEffect(() => {
    // When container is ready
    if (container) {
      // Create window
      newWindow.current = window.open(
        "",
        "",
        "width=600,height=400,left=200,top=200"
      );
      // Append container
      newWindow.current.document.body.appendChild(container);

      // Save reference to window for cleanup
      const curWindow = newWindow.current;

      // Return cleanup function
      return () => curWindow.close();
    }
  }, [container]);

  return container && createPortal(props.children, container);
};
🌐
react-window
react-window.vercel.app
Getting started with react-window
Documentation for the react-window NPM package
🌐
npm
npmjs.com › package › @asutrick › react-new-window
@asutrick/react-new-window - npm
August 22, 2024 - Support the full window.open api. Built for React 16 & React 18 (uses ReactDOM.createPortal). Handler for blocked popups (via onBlock prop). ... import React from 'react' import NewWindow from '@asutrick/react-new-window' const Demo = () => ( <NewWindow> <h1>Hi 👋</h1> </NewWindow> )
      » npm install @asutrick/react-new-window
    
Published   Aug 22, 2024
Version   1.1.1
Author   Austin Sutrick
🌐
Scott Logic
blog.scottlogic.com › 2019 › 10 › 29 › popout-windows-in-react.html
Popout Windows in React
October 29, 2019 - In a React app, opening and sharing data with a new (non-modal) window might seem like a challenge, but it's possible - and I've provided a component to make it even simpler.
🌐
Spritle software
spritle.com › home › how virtualization with react-window boosts react app performance
How Virtualization with React-Window Boosts React App Performance
April 29, 2025 - Virtualization is a technique that ... loading new items as the user scrolls. This optimizes performance by reducing the number of DOM elements and improving rendering efficiency. One of the most popular libraries for implementing virtualization in React is react-window...
🌐
Npm
npm.io › package › react-new-improved-window
React-new-improved-window NPM | npm.io
Center popups according to the parent window or screen. No external dependencies Only React 16 or 17 as a peer dependency. Codebase has been rewritten in TypeScript with many bugs discovered and fixed in the process. Codebase uses React hooks making react-new-improved-window functionally declarative.
🌐
GitHub
github.com › bvaughn › react-window
GitHub - bvaughn/react-window: React components for efficiently rendering large lists and tabular data · GitHub
Documentation for this project is available at react-window.vercel.app; version 1.x documentation can be found at react-window-v1.vercel.app.
Starred by 17.1K users
Forked by 817 users
Languages   TypeScript 96.8% | JavaScript 1.3%
🌐
Reddit
reddit.com › r/reactjs › react-window v2.0 is out 🥳
r/reactjs on Reddit: react-window v2.0 is out 🥳
August 28, 2025 -

Just a quick note that version 2 has been published.

Docs and examples can be found at https://react-window.vercel.app/

High level overview of what changed and why you might want to upgrade is in the change log but I'll save you a click:

  • More ergonomic props API

  • Automatic memoization of row/cell renderers and props/context

  • Automatically sizing for List and Grid (no more need for AutoSizer)

  • Native TypeScript support (no more need for u/types/react-window)

  • Smaller bundle size

I appreciate the feedback that was shared during the alpha phase. If anyone has troubles with v2, please tag me here or on GitHub and I'll be happy to take a look.

Thanks!