Hello! I triyng to complete the functionality displayed on pinned image. I have done this with FlatList's onScroll event, but it change value to slow, active item not always at the middle. Is this some way to always give styles to item, which is on center? Below is my scroll handler.
const onScroll = (event) => { const { y } = event.nativeEvent.contentOffset; const { height: layoutHeight } = event.nativeEvent.layoutMeasurement; const value = Math.floor(y / itemHeight) + Math.floor(layoutHeight / itemHeight / 2); if (activeItem !== value) { setActiveItem(value); } }