When to use TouchableNativeFeedback, TouchableHighlight or TouchableOpacity?

source: https://medium.com/differential/better-cross-platform-react-native-components-cb8aadeba472, by Nick Wientge

TouchableHighlight

• What it does: Darkens or lightens the background of the element when pressed.

• When to use it: On iOS for touchable elements or buttons that have a solid shape or background, and on ListView items.

TouchableOpacity

• What it does: Lightens the opacity of the entire element when pressed.

• When to use it: On iOS for touchable elements that are standalone text or icons with no background color.

TouchableNativeFeedback

• What it does: Adds a ripple effect to the background when pressed.

• When to use it: On Android for almost all touchable elements.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)