Skip to content

Commit 549835a

Browse files
authored
Update custom-navigators.md : Add missing variable (#1412)
In the TabNavigator example , isFocused Variable is using "index" variable to validate the condiation. However, in state.routes.map((route)...) the index variable is not defined which cause an error of no existing variable.
1 parent 779730c commit 549835a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

versioned_docs/version-7.x/custom-navigators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function TabNavigator({
8181
return (
8282
<NavigationContent>
8383
<View style={[{ flexDirection: 'row' }, tabBarStyle]}>
84-
{state.routes.map((route) => (
84+
{state.routes.map((route, index) => (
8585
<Pressable
8686
key={route.key}
8787
onPress={() => {

0 commit comments

Comments
 (0)