美文网首页
尝试CocoaPods装React native

尝试CocoaPods装React native

作者: 俩小门牙 | 来源:发表于2016-09-07 13:44 被阅读10次

    1、确定你的CocoaPods能用...

    2、在Podfile里添加

    pod'React'

    pod'React/RCTText'

    3、终端执行(保证目录正确前提下)pod install

    4、为你的应用程序的 React 代码创建一个目录,并创建一个简单的index.ios.js文件

    终端:

    mkdir ReactComponent

    touch index.ios.js 

    启动React Native 开发服务器

    (JS_DIR=`pwd`/ReactComponent; cd Pods/React; npm run start -- --root $JS_DIR)

    东西太少,有想知道更多的参考:http://wiki.jikexueyuan.com/project/react-native/integration-existing.html

    相关文章

      网友评论

          本文标题:尝试CocoaPods装React native

          本文链接:https://www.haomeiwen.com/subject/ebujettx.html