TanStack / TanStack/virtual

useVirtualizer is not a function error after upgrading to 3.1.2

Open
#681 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.1k
Forks
466
Avg merge
2d 31m
Merged PRs (30d)
13

Description

Describe the bug

We are using react-datasheet-grid (https://github.com/nick-keller/react-datasheet-grid), it is using @tanstack/react-virtual ,

We are getting below error , we see we are getting this on upgrade of @tanstack/react-virtual : 3.1.2

Grid.js:74 Uncaught TypeError: (0 , react_virtual_1.useVirtualizer) is not a function
at Grid (Grid.js:74:1)
at renderWithHooks (react-dom.development.js:12974:1)
at mountIndeterminateComponent (react-dom.development.js:15457:1)
at beginWork (react-dom.development.js:16510:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3551:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3595:1)
at invokeGuardedCallback (react-dom.development.js:3650:1)
at beginWork$1 (react-dom.development.js:20646:1)
at performUnitOfWork (react-dom.development.js:19657:1)
at workLoopSync (react-dom.development.js:19602:1)

Your minimal, reproducible example

NA

Steps to reproduce

We are using react-datasheet-grid (https://github.com/nick-keller/react-datasheet-grid), it is using @tanstack/react-virtual ,

We are getting below error , we see we are getting this on upgrade of @tanstack/react-virtual : 3.1.2

Grid.js:74 Uncaught TypeError: (0 , react_virtual_1.useVirtualizer) is not a function
at Grid (Grid.js:74:1)
at renderWithHooks (react-dom.development.js:12974:1)
at mountIndeterminateComponent (react-dom.development.js:15457:1)
at beginWork (react-dom.development.js:16510:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3551:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3595:1)
at invokeGuardedCallback (react-dom.development.js:3650:1)
at beginWork$1 (react-dom.development.js:20646:1)
at performUnitOfWork (react-dom.development.js:19657:1)
at workLoopSync (react-dom.development.js:19602:1)

Expected behavior

it should work as 3.0.4

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

OS : Windows
Browser: Chrome

tanstack-virtual version

v3.1.2

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the upgrade from @tanstack/react-virtual 3.0.4 to 3.1.2 with react-datasheet-grid, focusing on the useVirtualizer call reported at Grid.js:74. Compare the React adapter exports between those versions and verify the expected behavior after the upgrade. A fix is done when the grid renders without the reported TypeError and the regression is covered by a reproducible test.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.