Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Natice Expo: How can I change 「BottomTab.Screen」name type alias to Japanese?

$
0
0

BackgroundI try first time React Native Expo with typescript.so, I have no idea to use BottomTab.Screen.

Q. I would like to change 「name="TabOne"」to Japanese is 「ホーム」.

// navigation/BottomTabNavigator.tsxconst BottomTab = createBottomTabNavigator<BottomTabParamList>();export default function BottomTabNavigator() {  const colorScheme = useColorScheme();  return (<BottomTab.Navigator      initialRouteName="TabOne"      tabBarOptions={{ activeTintColor: Colors[colorScheme].tint }}><BottomTab.Screen        name="TabOne" // ホーム        component={TabOneNavigator}        options={{          tabBarIcon: ({ color }) => <TabBarIcon name="home" color={color} />,        }}      /><BottomTab.Screen        name="TabTwo"// タスク        component={TabTwoNavigator}        options={{          tabBarIcon: ({ color }) => <TabBarIcon name="task" color={color} />,        }}      /></BottomTab.Navigator>  );}
// types.txexport type BottomTabParamList = {  TabOne: undefined;  TabTwo: undefined;};

※ memoThis project is React Native Expo with TypeSript.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>