Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

react-native

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

like image 287
SoF Avatar asked Jun 20 '26 00:06

SoF


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

like image 81
1mike12 Avatar answered Jun 22 '26 13:06

1mike12



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!