TanStack / virtual

🤖 Headless UI for Virtualizing Large Element Lists in JS/TS, React, Solid, Vue and Svelte

Home Page:https://tanstack.com/virtual

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HMR (live reload, fast refresh) broke render in React

dartess opened this issue · comments

Describe the bug

After the hot reload, new list items are not rendered

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-virtual-dc5j1h?file=src%2Fmain.tsx,src%2FRowVirtualizerFixed.tsx&preset=node

Steps to reproduce

  1. open repl
  2. edit console.log('foo'); with some different text
  3. press cmd/ctrl+S for save and live reload
  4. scroll list
  5. see that list is empty

Expected behavior

it should just work

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

any platform , any bundler — vite, wepack, rspack

tanstack-virtual version

3.8.1

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.

Same here