infinite-viewer icon indicating copy to clipboard operation
infinite-viewer copied to clipboard

infiniteViewerRef.current.on is not a function

Open enk0de opened this issue 1 year ago • 2 comments

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.

enk0de avatar Jun 22 '23 03:06 enk0de

@hoondeveloper

Is there any reason to use on?

Try using react's on prefix prop.

onDragStart, onPinch, onScroll, ...

daybrush avatar Jun 22 '23 15:06 daybrush

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.

enk0de avatar Jun 24 '23 07:06 enk0de