More Related Content Similar to JSDC 2015 React-Native 實戰
Similar to JSDC 2015 React-Native 實戰 (20) JSDC 2015 React-Native 實戰2. Sam Lee
現職 : 趨勢科技 FED
熱衷 : 前端 / 後端 技術
淺草籤 作者
Email: lee.orz@gmail.com
5. 問 題
• UI 變化的很快
• iOS / Android 的 UI 無法共⽤用
• 上架時間⻑⾧長 (Review時間)
• 線上修正 Bug 相對困難
27. 三 步 驟
• 在現有App 安裝 React-Native (CocoaPods)
• 把 React Native View (RCTRootView) 放進現有 App
• 準備 index.ios.js (iOS)
50. 挑 戰 / 疑 慮
• 從 Web 轉到 Native 觀念的不同
• Appstore 的政策是否會改變
• 低階機型的效能問題
• Upgrade 的問題
• iOS6 無法使⽤用 (這會隨時間消逝)
54. 四 步 驟
• 新增
compile ‘com.facebook.react:react-native:0.11+’
到 build.gradle 中的 dependencies 區塊
• 在 AndroidManifest.xml 中加⼊入
<activity
android:name="com.facebook.react.devsupport.DevSettingsActivity" />
• 參考
https://gist.github.com/corbt/7cf2f0282a8936122c28
把 View 放進 Android !
• Follow React-Native 官網的
GUILDS (ANDROID) -> Native Modules
https://facebook.github.io/react-native/docs/native-modules-
android.html#content
56. Links
• React-Native :
https://facebook.github.io/react-native/
• Integrating React Native with an Existing App:
https://corbt.com/posts/2015/09/18/integrating-
react-native-with-an-existing-app.html
• Put your React-Native View to Android:
https://gist.github.com/corbt/
7cf2f0282a8936122c28