From b81357849b3e8bd30bf8ced00b5ad19c7e46a2d3 Mon Sep 17 00:00:00 2001 From: Bogdan Matasaru Date: Sat, 21 Sep 2024 14:20:52 +0300 Subject: [PATCH] Get rid of warning Metro displays a warning: Warning: A props object containing a "key" prop is being spread into JSX: let props = {key: someKey, route: ..., borderless: ..., centered: ..., rippleColor: ..., onPress: ..., onLongPress: ..., testID: ..., accessibilityLabel: ..., accessibilityRole: ..., accessibilityState: ..., style: ..., children: ...}; React keys must be passed directly to JSX without using spread: let props = {route: ..., borderless: ..., centered: ..., rippleColor: ..., onPress: ..., onLongPress: ..., testID: ..., accessibilityLabel: ..., accessibilityRole: ..., accessibilityState: ..., style: ..., children: ...}; in BottomNavigation.Bar (created by BottomNavigation) --- src/components/BottomNavigation/BottomNavigationBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BottomNavigation/BottomNavigationBar.tsx b/src/components/BottomNavigation/BottomNavigationBar.tsx index 0bfe303bfb..8ff49b6932 100644 --- a/src/components/BottomNavigation/BottomNavigationBar.tsx +++ b/src/components/BottomNavigation/BottomNavigationBar.tsx @@ -360,7 +360,7 @@ const BottomNavigationBar = ({ navigationState, renderIcon, renderLabel, - renderTouchable = (props: TouchableProps) => , + renderTouchable = (props: TouchableProps) => , getLabelText = ({ route }: { route: Route }) => route.title, getBadge = ({ route }: { route: Route }) => route.badge, getColor = ({ route }: { route: Route }) => route.color,