2

I am using this code and this is working fine it created tabs as i want. But i want that i can change tabs using index so that i can add some index or screen in the redux and i can redirect to that tab. I am not able to find anything related to it in this package as in the other packages. Let me if anyone can help me out. I am getting unusual thing that. I have declared a state hook array. In that i am adding some data. And each time i do console it showing empty. Please check and let me know if anyone have resolution for this.

import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';

const Tab = createMaterialTopTabNavigator();

function MyTabs() {
    return (
      <Tab.Navigator>
          <Tab.Screen name="Home" component={HomeScreen} />
          <Tab.Screen name="Settings" component={SettingsScreen} />
      </Tab.Navigator>
    );
}
Kirill Novikov
  • 2,576
  • 4
  • 20
  • 33
Rambler
  • 267
  • 1
  • 12

0 Answers0