How do I add a library to react-native project manually?

╄→гoц情女王★ 提交于 2019-12-13 20:24:40

问题


There is a library react-native-iron-source on GitHub. But this library is not in the npm.

How can I add the library to my react-native project manually? So that it works correctly with js code, iOS and Android?


回答1:


Try putting this in package.json

 "dependencies": {
         ...
        "react-native-iron-source": "git://github.com/bsy/react-native-iron-source.git"
    },


来源:https://stackoverflow.com/questions/49650202/how-do-i-add-a-library-to-react-native-project-manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!