when I try to click on the image then this error will show:- undefined is not an object (evaluating 'navigation.navigate') (Device) I want to that when I click on the image then details page is open
snack.expo.dev/@akhireact/travelappui
Page location:- ./component/Home.js
const Home = ({navigation}) => { const renderDiscoverItem = ({item}) => { return ( <TouchableOpacity onPress={() => navigation.navigate('Details', { item: item, }) }> <ImageBackground source={item.images} style={[ styles.discoverItem, {marginLeft: item.id === 'discover-1' ? 20 : 0}, ]} imageStyle={styles.discoverItemImage}> <Text style={styles.discoverItemTitle}>{item.title}</Text> <View style={styles.discoverItemLocationWrapper}> <Entypo name="location-pin" size={18} color={colors.white} /> <Text style={styles.discoverItemLocationText}>{item.location}</Text> </View> </ImageBackground> </TouchableOpacity> ); };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)