You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently upgraded an expo project to Expo SDK 52 which includes react-native 0.76, the following warning/error is being thrown when rendering a BottomNavigationBar:
ERROR 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: ...};<Touchable {...props} />
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: ...};<Touchable key={someKey} {...props} />in BottomNavigation.Bar (created by BottomNavigation)
in RCTView (created by View)
in View (created by BottomNavigation)
in BottomNavigation (created by MaterialBottomTabView)
in MaterialBottomTabView (created by MaterialBottomTabNavigator)
in PreventRemoveProvider (created by NavigationContent)
in NavigationContent
in Unknown (created by MaterialBottomTabNavigator)
in MaterialBottomTabNavigator (created by MemoHomeScreen)
The stack trace is much longer but I stopped at MemoHomeScreen as that is the first of my own files.
I delved into the source code and found the following which the diff that solved my problem:
P.S. This diff only changes the source file, the .js file in node_modules/react-native-paper/lib/module/components/BottomNavigation/BottomNavigationBar.js will also need changing if patching yourself, something like:
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.Recently upgraded an expo project to Expo SDK 52 which includes react-native 0.76, the following warning/error is being thrown when rendering a
BottomNavigationBar
:The stack trace is much longer but I stopped at MemoHomeScreen as that is the first of my own files.
I delved into the source code and found the following which the diff that solved my problem:
This issue body was partially generated by patch-package.
P.S. This diff only changes the source file, the .js file in
node_modules/react-native-paper/lib/module/components/BottomNavigation/BottomNavigationBar.js
will also need changing if patching yourself, something like:The text was updated successfully, but these errors were encountered: