Skip to content

Commit c0d2387

Browse files
babucarr32satya164
andauthored
Add unique key to custom tab bar item (#1390)
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
1 parent 724889b commit c0d2387

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

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

162162
return (
163163
<PlatformPressable
164+
key={route.key}
164165
href={buildHref(route.name, route.params)}
165166
accessibilityState={isFocused ? { selected: true } : {}}
166167
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)