react-native-keyboard-aware-scroll-view icon indicating copy to clipboard operation
react-native-keyboard-aware-scroll-view copied to clipboard

iOS scroll to top when rerender component

Open fatihkayan20 opened this issue 3 years ago • 2 comments

I create an animated KeyboardAwareScrollView like this: const AnimatedAwareScrollView = Animated.createAnimatedComponent( KeyboardAwareScrollView );

and i use this component. But when component rerender scroll to top in ios.

fatihkayan20 avatar Sep 05 '21 10:09 fatihkayan20

Same issue. Did you find any way to fix this @fatihkayan20 ?

nlarif avatar Aug 18 '23 09:08 nlarif

Found, const AnimatedKeyboardAwareScrollView = Animated.createAnimatedComponent(KeyboardAwareScrollView); should be moved outside of the component function to avoid being reinitialized at each rerender.

nlarif avatar Aug 18 '23 13:08 nlarif