react-native-paper
react-native-paper copied to clipboard
Future chore - BottomNavigation: React 18.3 to warn about spreading key props in JSX
Current behaviour
React 18.3 adds a warning about spreading props containing a "key" prop (https://github.com/facebook/react/pull/25697). Current version of React Native uses 18.2, but I think we'd expect it to be migrated in the next version.
When testing with React 18.3, we get this warning on a Touchable inside BottomNavigation.Bar.
Expected behaviour
Expected not to receive warnings.
How to reproduce?
Fresh React Native project, but change React version to 18.3.1. Reproduction example: https://github.com/nick42d/KeySpreadReproduction
Preview
What have you tried so far?
This is my mistake for upgrading React too early, but since I spent a few hours debugging this figure my pain can be your gain.
Your Environment
software | version |
---|---|
ios | x |
android | x |
react-native | 0.74.1 |
react-native-paper | 5.12.3 |
node | 21.7.3 |
npm or yarn | yarn 3.6.4 |
expo sdk | x.x.x |