infinite-viewer
infinite-viewer copied to clipboard
infiniteViewerRef.current.on is not a function
In react, when i pass ref to InfiniteViewer component, and i refer infiniteViewerRef.current.on
, the error infiniteViewerRef.current.on is not a function is not a function
is shown.
@hoondeveloper
Is there any reason to use on
?
Try using react's on prefix prop.
onDragStart, onPinch, onScroll, ...
I was going to take the responsibility of handling the infinite viewer's events away from the manager that is declared as class
that manages the infinite viewer, but on second thought, that's not necessary. Thanks for the answer.