mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-26 13:35:32 +08:00
Fix ActiveScreen in custom navigation (#2354)
This commit is contained in:
committed by
Matt Hamil
parent
8cd77cfad4
commit
aa92bcb0dd
@@ -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