My bottom navigator:
firstly, in the top;
secondly, doesnt showing any of my pages;
My code:
App.js
import { NavigationContainer } from '@react-navigation/native'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from './Screens/HomeScreen'
import InternetScreen from './Screens/InternetScreen'
import GroupScreen from './Screens/GroupScreen'
const homeName = "Home"
const internetName = "Internet"
const groupName = "Group"
export default function App() {
const Tab = createBottomTabNavigator()
return (
<NavigationContainer>
<Tab.Navigator>
<Tab.Screen name={homeName} component={HomeScreen} />
<Tab.Screen name={internetName} component={InternetScreen} />
<Tab.Screen name={groupName} component={GroupScreen} />
</Tab.Navigator>
</NavigationContainer>
);
}
HomeScreen.js and other (they are similar)
import { View, Text, StyleSheet, SafeAreaView } from 'react-native';
const HomeScreen = () => {
return (
<SafeAreaView>
<View style={styles.container}>
<Text style={styles.text}>Home Page</Text>
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
text: {
fontSize: 24,
fontWeight: "bold",
marginBottom: 16
}
});
export default HomeScreen;
index.html just creating root for app
i tried all guides that i can find in internet, but nothing can help
result:
enter image description here
New contributor
Mr. Fire is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.