I'm currently working on a react project that has a navigation page with widgets that navigate to various parts of the app. However, I'm not sure how to make them navigate to their appropriate screens.
Edit:
I have added more of the code in order to better illustrate what I am trying to do. 
import React from 'react';
import {View, FlatList, Text, TouchableOpacity, Dimensions} from 'react-native';
import LinearGradientScreen from './linearGradientScreen';
import Feather from 'react-native-vector-icons/Feather';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Entypo from 'react-native-vector-icons/Entypo';
const CellComponent = (props) => {
return (
<TouchableOpacity
onPress={() => props.navigation.navigate('tabNavigator')}
style={{
backgroundColor: props.item.color,
height: (13 * Dimensions.get('window').height) / 100,
width: 132,
borderRadius: 5,
shadowColor: 'rgba(52,2,2,1)',
shadowOffset: {
width: 3,
height: 3,
},
elevation: 5,
shadowOpacity: 1,
shadowRadius: 0,
margin: 20,
alignItems: 'center',
justifyContent: 'center',
}}>
{props.item.family === 'Feather' ? (
<Feather
type={props.item.type}
color={'rgba(255,255,255,1)'}
name={props.item.icon}
size={30}
/>
) : null}
{props.item.family === 'MaterialCommunityIcons1' ? (
<MaterialCommunityIcons
type={props.item.type}
color={'rgba(255,255,255,1)'}
name={props.item.icon}
size={30}
/>
) : null}
{props.item.family === 'Entypo' ? (
<Entypo
type={props.item.type}
color={'rgba(255,255,255,1)'}
name={props.item.icon}
size={30}
/>
) : null}
{props.item.family === 'MaterialCommunityIcons2' ? (
<MaterialCommunityIcons
type={props.item.type}
color={'rgba(255,255,255,1)'}
name={props.item.icon}
size={30}
/>
) : null}
{props.item.family === 'MaterialCommunityIcons' ? (
<MaterialCommunityIcons
type={props.item.type}
color={'rgba(255,255,255,1)'}
name={props.item.icon}
size={30}
/>
) : null}
{props.item.family === 'FontAwesome' ? (
<FontAwesome
type={props.item.type}
color={'rgba(255,255,255,1)'}
name={props.item.icon}
size={30}
/>
) : null}
<Text
style={{
color: 'white',
fontSize: 18 * Dimensions.get('window').fontScale,
}}>
{props.item.name}
</Text>
</TouchableOpacity>
);
};
const HomeScreen = (props) => {
return (
<LinearGradientScreen>
<View style={{alignItems: 'center', justifyContent: 'center'}}>
<Text
style={{
marginTop: '20%',
fontSize: 50 * Dimensions.get('window').fontScale,
color: 'white',
fontWeight: 'bold',
}}>
Home
</Text>
<Text
style={{
fontSize: 25 * Dimensions.get('window').fontScale,
color: 'white',
fontWeight: '400',
marginBottom: '10%',
}}>
Select a service
</Text>
<FlatList
numColumns={2}
data={HomeScreenData}
renderItem={({item}) => {
return <CellComponent {...props} item={item} />;
}}
/>
</View>
</LinearGradientScreen>
);
};
const HomeScreenData = [
{
id: 1,
name: 'AI Chat',
icon: 'cpu',
family: 'Feather',
color: 'rgba(247,52,122,1)',
},
{
id: 2,
name: 'Live Chat',
icon: 'wechat',
family: 'FontAwesome',
color: 'rgba(16,165,245,1)',
},
{
id: 3,
name: 'Resources',
icon: 'file-document-outline',
family: 'MaterialCommunityIcons',
color: 'rgba(74,74,74,1)',
},
{
id: 1,
name: 'Client Connect',
icon: 'gesture-swipe-horizontal',
family: 'MaterialCommunityIcons1',
color: 'rgba(237,41,57,1)',
},
{
id: 1,
name: 'DM',
icon: 'message',
family: 'Entypo',
color: 'rgba(74,144,226,1)',
},
{
id: 1,
name: 'Profile',
icon: 'tooltip-account',
family: 'MaterialCommunityIcons2',
color: 'rgba(144,19,254,1)',
},
];
export default HomeScreen;
Is there something like navigate: 'AiScreen.js', that I can use to make it navigate to the correct place?
