mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 17:31:06 +08:00
Fix ActiveScreen in custom navigation (#2354)
This commit is contained in:
@@ -63,7 +63,7 @@ const CustomTabBar = ({ navigation }) => {
|
||||
|
||||
const CustomTabView = ({ router, navigation }) => {
|
||||
const { routes, index } = navigation.state;
|
||||
const ActiveScreen = router.getComponentForState(navigation.state);
|
||||
const ActiveScreen = router.getComponentForRouteName(routes[index].routeName);
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<CustomTabBar navigation={navigation} />
|
||||
|
||||
Reference in New Issue
Block a user