Quantcast
Channel: react-native TouchableNativeFeedback onPress not working - Stack Overflow
Viewing all articles
Browse latest Browse all 8

Answer by cobberboy for react-native TouchableNativeFeedback onPress not working

$
0
0

I've discovered that adding a Ripple effect to the TouchableNativeFeedback fixes the issue for me:

background={TouchableNativeFeedback.Ripple("#FFFFFF",true)}

i.e.

export default function withFeedback2(  WrappedComponent) {  return class extends BaseComponent {    constructor(props) {      super(props);    }    render() {      return (<View><TouchableNativeFeedback            onPress={() => this.props.onContainerViewPress()}            background={TouchableNativeFeedback.Ripple("#FFFFFF",true)}><WrappedComponent {...this.props} /></TouchableNativeFeedback></View>      );    }  };}

Viewing all articles
Browse latest Browse all 8

Trending Articles