Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a React Native package (View) which depends on other Native packages

Long story short, I am currently creating an npm package for React Native that is dependent on other packages that are native and require linking, pod install, etc. I am currently using peerDependencies to make it work but I would like to include everything in the package for people to enjoy an easy installation process instead of manually installing 3-6 dependencies themselves.

I am not sure where to start about that or if it's even possible, any thoughts are appreciated.

like image 609
yemd Avatar asked Nov 15 '22 18:11

yemd


1 Answers

I think the first think you should check is this library. It's actually recommended by the official React Native documentation.

You can create basic bootstrap for your npm package with this command (check the link above to RN docs for more information):

npx create-react-native-library react-native-awesome-module
like image 129
AndreyProgr Avatar answered Dec 09 '22 21:12

AndreyProgr