unstale

npm / react-window

react-window

What changed in react-window 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-21.

3 breaking14 new APIs and options6 performance4 behavior and defaults1 tooling19 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

react-window 247 changes

Breaking changes 3

  • Version 2 uses List in place of FixedSizeList, with rowComponent, rowCount, rowHeight, and rowProps props in the upgrade example.

    2.0.0release notes

  • Peer dependencies now require React version 18 or newer.

    2.0.0release notes

  • A ResizeObserver primitive or polyfill is required unless explicit pixel dimensions are provided via the style prop.

    2.0.0release notes

New APIs and options 14

  • Supports behavior: "smooth" for dynamic row heights; useVirtualizer's scrollToIndex supports it as well.

    2.5.1release notes

  • List and Grid accept scrollElement to scroll with the page or an ancestor element, rendering only rows visible within that element’s viewport.

    2.5.0release notes

  • Adds a hook for tracking whether a list, grid, or scroll element is scrolling.

    2.5.0release notes

  • Adds a hook for custom headless virtualized content that returns items, total size, visible range, and a scrollToIndex method.

    2.5.0release notes

  • Adds a prop to set the initial horizontal scroll position, applied after hydration unless the browser has already restored a scroll position.

    2.4.0release notes

  • Adds a prop to set the initial vertical scroll position, applied after hydration unless the browser has already restored a scroll position.

    2.4.0release notes

  • Adds a prop to set the initial scroll position, applied after hydration unless the browser has already restored a scroll position.

    2.4.0release notes

  • Adds an option for providing row heights known or estimated ahead of time, such as during server rendering.

    2.4.0release notes

  • Accepts an optional ownerDocument parameter and caches the measured size separately for each document.

    2.3.4release notes

  • Grid accepts an optional columnKey prop.

    2.3.0release notes

  • List accepts an optional rowKey prop.

    2.3.0release notes

  • Grid accepts an optional rowKey prop.

    2.3.0release notes

  • Use the defaultHeight prop to server render the initial set of rows.

    2.2.5release notes

  • Use the defaultWidth prop to server render the initial set of cells.

    2.2.5release notes

Performance 6

  • Rendering no longer computes and caches bounds for every item when fixed-size rows or columns have size 0.

    2.4.1release notes

  • Fixes unnecessary size calculations when scrolling beyond cached bounds.

    2.3.3release notes

  • Avoids allocating bounds for items preceding fixed-size jumps.

    2.3.2release notes

  • Calculates fixed-size visible ranges directly and searches cached variable-size bounds instead of scanning from the beginning.

    2.3.2release notes

  • Row and cell renderers, along with props and context, are automatically memoized.

    2.0.0release notes

  • Version 2 offers a smaller bundle size.

    2.0.0release notes

Behavior and default changes 4

  • List and Grid now have displayName values for React DevTools and error messages in minified builds, without preventing bundlers from tree shaking unused components.

    2.5.2release notes

  • List, Grid, and useDynamicRowHeight use the ResizeObserver, requestAnimationFrame, and document belonging to the window containing the list, supporting rendering into another window such as an iframe or portal pop-up.

    2.3.4release notes

  • Uses fractional percentage sizing.

    2.3.2release notes

  • Grid now supports automatic sizing, so AutoSizer is no longer needed.

    2.0.0release notes

Tooling 1

  • TypeScript support is native, so the separate @types/react-window package is no longer needed.

    2.0.0release notes

Fixes and other changes 19

  • List identifies rows by aria-posinset so additional children and rows that render nothing do not affect row measurement or subsequent indices. Spread ariaAttributes onto every row or none.

    2.5.3release notes

  • Corrections for a scroll requested while the page is hidden no longer time out before the page becomes visible again.

    2.5.1release notes

  • Scrolling to a row, column, or cell now respects the CSS scroll-padding of the element being scrolled.

    2.5.0release notes

  • Invalid sizes, such as percentage strings that cannot be parsed or negative values, are treated as 0.

    2.4.1release notes

  • When fixed-size rows or columns have size 0, only the first item is rendered instead of the last items or every item when the scroll offset was negative.

    2.4.1release notes

  • Server-rendered rows with dynamic heights remain in normal document flow until measured, avoiding overlap or gaps before hydration.

    2.4.0release notes

  • No longer throws when called during server rendering; it now returns 0.

    2.4.0release notes

  • Fixes List and Grid logging useLayoutEffect warnings when server rendered with React 18.

    2.4.0release notes

  • Rows with an aria-hidden attribute are now measured.

    2.3.4release notes

  • Fixes center alignment near list boundaries.

    2.3.2release notes

  • Fixes dropped prop updates.

    2.3.2release notes

  • Fixes stale row measurements when rows are reordered by key.

    2.3.2release notes

  • Fixes scrolling and alignment in RTL layouts.

    2.3.2release notes

  • Improves scrollToRow accuracy for rows with dynamic heights.

    2.3.2release notes

  • Grid updates its direction when the dir prop changes after mount.

    2.3.1release notes

  • useDynamicRowHeight no longer instantiates ResizeObserver when server-rendering.

    2.2.6release notes

  • Imperative scroll-to methods throw a RangeError instead of a regular Error when passed an invalid index.

    2.2.3release notes

  • The return type is explicitly annotated as ReactElement to fix TypeScript warnings for React versions 18.0–18.2.

    2.2.2release notes

  • Adjust the TypeScript return type to work around a ReactNode versus ReactElement mismatch caused by #875.

    2.2.2release notesrelease notes