1. react-native

1.1. 开发环境

只能在 Mac 下开发,所以 Windows 需要用 VMWare 安装 mac OS.

1.2. 新建工程

new react-native - uses yarn

To run your app on iOS:
   cd /Users/Bell/react-native/ytest
   react-native run-ios
   - or -
   Open /Users/Bell/react-native/ytest/ios/ytest.xcodeproj in Xcode
   Hit the Run button
To run your app on Android:
   Have an Android emulator running (quickest way to get started), or a device connected
   cd /Users/Bell/react-native/ytest
   react-native run-android

1.3. IDE

推荐用 WebStorm。

1.4. 热更新

1.5. 布局

  • FLex css3 新属性

1.6. 框架

  • Flux 单向数据流动,即永远只有从模型到视图的数据流动
  • Redux 由 Flux 演变而来,后来受 Elm 启发,去掉了 Flux 的复杂性

  • Redux 中文文档

1.7. Issue

1.8. 异常收集

生成 source map

react-native bundle --platform ios --entry-file index.ios.js --dev false --bundle-output ./ios/main.jsbundle --assets-dest ./ios --sourcemap-output ./ios/sourcemap.js

1.9. 源码分析

1.9.1. Android

1.9.2. iOS

results matching ""

    No results matching ""