Open MandoMG opened 2 years ago
+1 "react": "18.0.0", "react-native": "0.69.3" "@react-native-picker/picker": "^2.4.2"
Same here!
"react": "18.2.0",
"react-native": "0.69.5",
"@react-native-picker/picker": "^1.8.3",
As reported by @stocaaro here, it seems to be an issue related to ReactNative >= 0.69.
There are 3 workarounds:
bump
Same here with :
"react": "18.0.0"
"react-native": "0.69.6"
"@react-native-picker/picker": "2.4.3"
Solved for me.
I am using react-native-picker-select on top of @react-native-picker/picker. I found out that react-native-picker-select was installing on old version of @react-native-picker/picker under node_modules/react-native-picker-select/node_modules/@react-native-picker/picker
which was the one throwing the exception.
I updated my packages.json with:
"resolutions": {
"react-native-picker-select/@react-native-picker/picker": "^2.4.8"
},
and used Yarn locally and in my CI/CD. I removed the usage of npm install --save --legacy-peer-deps
which is no longer needed.
Now react-native-picker-select is relying on the newest version within node_modules and I don't see the error anymore.
I implemented the picker on iOS but on Android I'm getting an Invalid hook call everytime I reach the component where my picker lives. Is anyone else seeing this issue?
"react": "17.0.2", "react-native": "0.67.1", "@react-native-picker/picker": "^2.4.1"