[ad_1]
I’ve a Tab Navigator in a Element, however to set the primary router when displaying in a tab by the worth of props, I do not understand how, Can somebody assist me with the issue this
My code as under:
import React from 'react';
import { createAppContainer } from 'react-navigation';
import { createMaterialTopTabNavigator } from 'react-navigation-tabs';
import { Dimensions } from 'react-native';
const TabNavigator = createMaterialTopTabNavigator(
{
A: {
display screen: (props) => (
<A />
)
},
B: {
display screen: (props) => (
<B />
)
},
C: {
display screen: (props) => (
<C />
)
}
},
{
initialRouteName: props.initRouter
}
);
const TopTab = createAppContainer(TabNavigator);
export default TopTab;
Edit: Model react-navigation I exploit:
"@react-navigation/bottom-tabs": "^5.11.8",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.12.5",
[ad_2]
