react-native-reanimated-carousel icon indicating copy to clipboard operation
react-native-reanimated-carousel copied to clipboard

when onScrollBegin is being called before calling onScrollEnd

Open michel-adrion opened this issue 3 years ago • 1 comments

When "onScrollBegin" is being started before calling onScrollEnd against previous onScrollBegin, Current onScrollBegin is ignored.

michel-adrion avatar Jun 11 '22 13:06 michel-adrion

Hi @michel-adrion, could you provide some example showing this behavior. I've been working on different use cases, scrolling through different speeds and scrolling timings. the way <Carousel /> handles onScrollEnd is just running it once depending which is the latest scrolled element. meanwhile onScrollBegin is called every time you scroll into new indexed element. Under the hood <Carousel /> uses a custom hook called useCarouselController() which runs any function inside onScrollBegin and onScrollEnd directly on the JS thread (maybe some asynchronous based functions could have weird behaviors)

oliverloops avatar Jun 19 '22 08:06 oliverloops

If you can provide a reproduction, I'll reopen this issue.

dohooo avatar Aug 12 '22 02:08 dohooo