Skip to content

Migration guide for version 2.x upgrade #841

@lperry25

Description

@lperry25

Summary

Upgrading from react-window v1 to v2 is confusing without a consolidated migration guide. In v1 we used FixedSizeList / VariableSizeList and the child render function; in v2 there’s a unified List with a rowComponent prop and new prop/type names. I’m not finding a single place that explains the exact mappings (components, props, and TS types), so the upgrade generates a lot of TypeScript errors and guesswork.

Docs I found

  • Releases show a small upgrade snippet (uses List, rowComponent, rowCount, rowHeight, rowProps), but it doesn’t cover the common v1 surfaces (variable-size, horizontal lists, scroll/resize handlers, height, width etc.). 
  • README points to the docs site, but there isn’t a dedicated migration page that covers the above in one place.

Requested migration content

  1. Component mapping
  • FixedSizeList → List (fixed-size)
  • VariableSizeList → List (variable-size)
  1. Prop mapping (Lists)
  • itemCount → rowCount
  • itemSize (number) → rowHeight (number) for fixed-size
  • Horizontal lists: document the v2 prop(s) to replace layout="horizontal" (if applicable)
  • Sizing (previous height & width props)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions