Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

How do I change this React Navigation v5 code to v6

const RNTabNavMaterialTab = () => {
  return (
    <NavigationContainer>
      <Tab.Navigator
          screenOptions={({route}) => ({
          tabBarActiveTintColor: "#f0f",
          tabBarInactiveTintColor: "#555",
          tabBarActiveBackgroundColor: "#fff",
          tabBarInactiveBackgroundColor: "#999",
          tabBarShowLabel: true,
          tabBarLabelStyle: {"fontSize": 14},
          tabBarStyle: [{"display": "flex"},null],
          tabBarIcon: ({focused, size, color}) => {
            let iconName;
            if (route.name === 'Screen_A') {
              iconName = 'autoprefixer';
              size = focused ? 25 : 20;
              // color = focused ? '#f0f' : '#555';
            } else if (route.name === 'Screen_B') {
              iconName = 'btc';
              size = focused ? 25 : 20;
              // color = focused ? '#f0f' : '#555';
            }
            return <FontAwesome5 name={iconName} size={size} color={color} />;
          },
        })}>
        <Tab.Screen
          name="Screen_A"
          component={ScreenA}
          options={{headerShown: false}}
        />
        <Tab.Screen
          name="Screen_B"
          component={ScreenB}
          options={{headerShown: false}}
        />
      </Tab.Navigator>
    </NavigationContainer>
  );
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: Syntax for npx 
Javascript :: Reanimated2 interpolateNode to animate opacity error "undefined is not an object 
Javascript :: Use of typescript generics for extended parametres 
Javascript :: how to send more than one array using response() json() in laravel 
Javascript :: Target one specific Jquery Data Table theader for CSS styles 
Javascript :: javascript array add method 
Javascript :: access language in request express 
Javascript :: sort lowest to highest js 
Javascript :: fireOnChange 
Javascript :: Special Chars like DOTS in Express.js route 
Javascript :: to fix a broken class oop javascript 
Javascript :: morgan 
Javascript :: Creating Variables In Self Evoking Function 
Javascript :: bcrypt npm 
Javascript :: Uncaught Error: spawn node 
Javascript :: phaser asteroid movement 
Javascript :: Creating getLastBlock Object for blockchain 
Javascript :: counter using redux 
Javascript :: phaser add camera 
Javascript :: react antd modal with quill 
Javascript :: Create A Class That Returns A Promise In Constructor 
Javascript :: 1--Reverse Bits Algo 
Javascript :: isPowerOfTow 
Javascript :: useState increase Likes 
Javascript :: Deployment of react static page using node and express 
Javascript :: supabase 
Javascript :: adding javascript object within array 
Javascript :: 2d array js 
Javascript :: electron npm start not working 
Javascript :: hello world js 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =