Skip to content

Commit 7a9d9be

Browse files
committed
Use route.key instead of label
1 parent 1075583 commit 7a9d9be

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

versioned_docs/version-7.x/bottom-tab-navigator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function MyTabBar({ state, descriptors, navigation }) {
161161

162162
return (
163163
<PlatformPressable
164-
key={label}
164+
key={route.key}
165165
href={buildHref(route.name, route.params)}
166166
accessibilityState={isFocused ? { selected: true } : {}}
167167
accessibilityLabel={options.tabBarAccessibilityLabel}

versioned_docs/version-8.x/bottom-tab-navigator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ function MyTabBar({ state, descriptors, navigation }) {
238238

239239
return (
240240
<PlatformPressable
241+
key={route.key}
241242
href={buildHref(route.name, route.params)}
242243
accessibilityState={isFocused ? { selected: true } : {}}
243244
accessibilityLabel={options.tabBarAccessibilityLabel}

0 commit comments

Comments
 (0)