我有一个项目列表,我想使用反应原生导航将导航传递给它,这是我的主要代码,
import React from 'react'
import { StyleSheet, Text, View, TouchableOpacity, ScrollView, Image } from 'react-native'
import ItemComponent from './ItemComponent'
const ItemDescription = ({navigation}) => {
return (
<View style={styles.container}>
<ScrollView style={{marginBottom: '15%'}}>
<ItemComponent title='Shirts'
imageSource={require('../Screen/Images/Shirt.png')}
/>
<ItemComponent title="T-Shirt"
imageSource={require('../Screen/Images/t-shirt.png')}
/>
</ScrollView>
</View>
)
}
我需要在代码的哪一部分使用导航以及如何在上面传递任何道具?