Closed jacquesdev closed 2 years ago
I'm not sure I understand your question. picker
is a peerDependency
meaning that you should run npm install react-native-picker/picker@^2.0 -S
in your project along with installing react-native-phone-input
... then simply follow any install instructions for your own project, using the following guide https://www.npmjs.com/package/@react-native-picker/picker
This is different from a direct dependency
. Direct dependencies get bundled along with the project, but peer dependencies do not.
Hi @rililive
Assuming that you cannot run this project without picker, I'd argue that it is a direct dependency?
Even if it's optional, I did not see if the installation/readme docs, but could have missed it. Does it not make things easier by just making it a dependency of this project?
I think we should just be making installation of this package as easy as possible for everyone, and that is why I am suggesting this, but happy if you have an alternative solution or view?
peerDependencies allow the user to update to the latest version without requiring the publisher of the parent package to re-publish each time a peerDependency has a new release. This is the whole purpose and you can find more info about the reasoning here https://nodejs.org/es/blog/npm/peer-dependencies/
It looks likes react-native-picker/picker is a dependency of this project, but it's not installed correctly (for iOS)?
Specifically, this package does not install the ios pod RNCPicker (2.1.0):, which is installed when I installed react-native-picker/picker manually.
I guess we'd need to update the podfile.lock of this project, happy to do it, if someone can confirm that is the right way to go about it?