Reference home > @af-utils/virtual-react > useSubscription
useSubscription() function
React hook. Allows to subscribe to VirtualScrollerEvent without unnecessary rerenders.
Signature:
Parameters
Parameter |
Type |
Description |
---|---|---|
model |
VirtualScroller instance | |
events |
readonly VirtualScrollerEvent[] | VirtualScrollerEvent[] |
array of VirtualScrollerEvent to subscribe |
callBack |
() => void |
callback to be called |
Returns
void
Remarks
For example can be used in load-on-demand.