So Im using @react-navigation/bottom-tabs
to create a simple bottom tab navigator between two screens and im getting this weird look:
Im using a very simple example, here's the code for my first and second screen:
const ScreenOne = () => {
return <Text>Screen 1</Text>;
};
const Favorites = () => {
return <Text>Favorites</Text>;
};
and here's the code used for my bottom navigator:
const RootNavigator = () => {
return (
<BottomTabs.Navigator
initialRouteName="Screen One">
<BottomTabs.Screen name="Screen One" component={ScreenOne} />
<BottomTabs.Screen name="Favorites" component={FavoritesScreen} />
</BottomTabs.Navigator>
);
};
Here's my component in App.js
const App = () => {
return (
<NavigationContainer theme={{colors: {background: 'white'}}}>
<View style={{backgroundColor: 'white', flex: 1}}>
<RootNavigator />
</View>
</NavigationContainer>
);
};
export default App;
Why is this happening, and is there anyway to fix this using screenOptions
prop or the options
prop in each individual screen?