Quantcast
Viewing latest article 5
Browse Latest Browse All 8

Answer by cobberboy for react-native TouchableNativeFeedback onPress not working

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 latest article 5
Browse Latest Browse All 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>