Difference between TextInput from "react-native" and "react-native-gesture-handler"?

Viewed 527

What is the difference between TextInput import from "react-native" and "react-native-gesture-handler"?

1 Answers

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

Related