Skip to content
Source
Sign inSign up
TanStack/virtual

refactor(examples): improve React examples code quality #1121

Openliwenka1(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/1121/headopened

Changes

  • Improve variable naming for better readability (rows → rowSizes, columns → columnSizes)
  • Remove unused imports and variables (Row type, setData)
  • Fix type safety issues (add explicit String() conversion for symbol keys)
  • Unify array type syntax to Array<T> for consistency
  • Remove unnecessary non-null assertions in makeData.ts
  • Clean up eslint-disable comments after fixing underlying issues

Motivation

These changes improve code quality in the React examples, making them easier to understand for developers learning the library. The naming improvements (rowSizes/columnSizes) more clearly indicate that these arrays contain dimension values rather than the actual row/column components.

Testing

  • All modified examples tested locally
  • No runtime behavior changes
  • Lint errors resolved
    1. ⚠️ No Changeset found

      Latest commit: a4c736c446a70db2ad21d56f589eb25a86b0dfb8

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

Sign in to join this conversation.