Quantcast
Channel: Active questions tagged touchablewithoutfeedback - Stack Overflow
Viewing all articles
Browse latest Browse all 46

React Native: New screen after touching image using stack navigator

$
0
0

I am trying to learn React Native by creating an app. After I touch an image I want a new screen to be placed on top of the current screen.

I think I want to use a StackNavigator after onPress? I've read about them but don't know how to use them with my current code. Any ideas??

const listView = ({name, picture}) => { 
       return (  
        <View style = {styles.item}>  
          <TouchableWithoutFeedback onPress={() => //new screen here!!}>  
            <ImageBackground source = {picture}  
                             resizeMode = 'cover'  
                             style={styles.image}>  
                <Text style={styles.text}>{name}</Text>  
            </ImageBackground>  
            </TouchableWithoutFeedback>  
        </View>  
      )  
};

Please leave any questions you need in the comments.


Viewing all articles
Browse latest Browse all 46

Trending Articles



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