In React Native, there are at least three ways to make a button: TouchableNativeFeedback
, TouchableHighlight
and TouchableOpacity
. There is also TouchableWithoutFeedback
, which the documentation clearly states you should not use because "all the elements that respond to press should have a visual feedback when touched".
- TouchableNativeFeedback is Android only and "replaces the View with another instance of RCTView"
- TouchableHighlight "adds a view to the view hierarchy"
- TouchableOpacity works "without changing the view hierarchy"
Are there any other significant differences between the three? Is one of them the goto component? In what case should you use TouchableHighlight
over TouchableOpacity
? Are there any performance implications?
I am writing an application right now, and find that all three have a significant delay between tap and the action (in this case a navigation change). Is there any way to make it snappier?