useVirtualSnapshot()
function useVirtualSnapshot(model, events?): number;Re-render the current component when selected model events are published.
Parameters
model
events?
number = VirtualScrollerEvent.RANGE
Returns
number
The model revision used as the React external-store snapshot.
Related examples
- Simple PrimitivesreactThis example builds a list from the adapter's lower-level model, layout, range, and item primitives instead of its high-level list binding.
- GridreactThis example combines one vertical model and one horizontal model to virtualize a dynamic two-dimensional grid.
- Nested ContainerreactThis example separates the native scroll owner from the element that contains the virtual range. Content can appear before the list while core still measures the nested offset and publishes the correct geometry.
- TablereactThis example virtualizes dynamic rows without breaking native table semantics. Spacer rows represent content above and below the rendered range because a positioning wrapper cannot sit between tbody and tr.
- Event SubscriptionsreactThis example subscribes separate, small consumers to range and size events. Unrelated model changes stay out of each framework's broader render or reactive update path.
- Window ScrollreactThis example uses the browser window as the native scroll owner while the virtual range remains nested inside ordinary page content.