Following error is being thrown while trying to use @react-native-picker/picker in a react-native-web application.
package.json dependencies include:
"@react-native-picker/picker": "^1.16.1",
"babel-plugin-react-native-web": "^0.17.0",
"customize-cra": "^1.0.0",
"react-app-rewired": "^2.1.8"
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native-web": "^0.15.7"
I'm using react-native version 0.61.5
Hi, This error costed me a hackathon win !
basically at picker.web.js , it's not able to import createElement. if you go and check picker.web.js file createElement is used something like this.
we just need unstable_createElement ! so comment out this line and add following to the imports. !
now export your web builds !