Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/BottomNavigation/BottomNavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ const BottomNavigationBar = <Route extends BaseRoute>({
navigationState,
renderIcon,
renderLabel,
renderTouchable = (props: TouchableProps<Route>) => <Touchable {...props} />,
renderTouchable = (props: TouchableProps<Route>) => <Touchable {...props} key={props.key} />,
Copy link

@ChromeQ ChromeQ Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually remove the "key" from the props, so it will still be included and spread further down inside the Touchable component.
It should be:

renderTouchable = ({ key, ...props }: TouchableProps<Route>) => <Touchable {...props} key={key} />,

getLabelText = ({ route }: { route: Route }) => route.title,
getBadge = ({ route }: { route: Route }) => route.badge,
getColor = ({ route }: { route: Route }) => route.color,
Expand Down