flâneur — a map of the web's best reading

Virtualizer | TanStack Virtual Docs

tanstack.com · 3,427 words · saved by 1 readers

The Virtualizer class is the core of TanStack Virtual. Virtualizer instances are usually created for you by your framework adapter, but you do receive the virtualizer directly. The total number of items to virtualize. A function that returns the scrollable element for the virtualizer. It may return null if the element is not available yet. 🧠 If you are dynamically measuring your elements, it's recommended to estimate the largest possible size (width/height, within comfort) of your items. This will ensure features like smooth-scrolling will have a better chance at working correctly. This function is passed the index of each item and should return the actual size (or estimated size if you will be dynamically measuring items with virtualItem.measureElement) for each item. This measurement should return either the width or height depending on the orientation of your virtualizer. Set to false to disable scrollElement observers and reset the virtualizer's state Set to true to enable debug l

Virtualizer | TanStack Virtual Docs TanStack Virtual v3 v3 Search AI Ask AI Log In Log In Docs React Latest Search... K Core APIs Virtualizer VirtualItem Menu Menu React Latest Core APIs Virtualizer VirtualItem AI/LLM: This documentation page is available in plain markdown format at /virtual/latest/docs/api/virtualizer .md Core APIs On this page Virtualizer Copy page The Virtualizer class is the core of TanStack Virtual. Virtualizer instances are usually created for you by your framework adapter, but you do receive the virtualizer directly. tsx export class Virtualizer < TScrollElement = unkno

Explore this link on the map →

related reading