Reference home > @af-utils/virtual-react > useComponentSubscription

useComponentSubscription() function

React hook. Rerenders component when one of VirtualScrollerEvent gets emitted.

Signature:

useComponentSubscription: (model: VirtualScroller, events: readonly VirtualScrollerEvent[] | VirtualScrollerEvent[]) => void

Parameters

Parameter

Type

Description

model

VirtualScroller

events

readonly VirtualScrollerEvent[] | VirtualScrollerEvent[]

Returns

void

Remarks

Usually Subscription() is a better alternative. This hook might be used in grid scenario.