Reputation: 787
What is the difference between TextInput import from "react-native" and "react-native-gesture-handler"?
Upvotes: 8
Views: 2719
Reputation: 3453
I too was wondering abou this, but from looking at the source, we can see that the gesture handler version is just a wrapper around the base TextInput. export const TextInput = createNativeWrapper<RNTextInputProps>(RNTextInput);
And online they explain that createNativeWrapper
as
"Creates provided component with NativeViewGestureHandler, allowing it to be part of RNGH's gesture system."
So I think if you use the wrapped one, it will give you access to all sorts of gestures, like pinching, panning, long press etc that the base input doesn't have
Upvotes: 10