只能在 Mac 下开发,所以 Windows 需要用 VMWare 安装 mac OS.
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
推荐用 WebStorm。
-
File->Settings->Languages&Frameworks->JavaScript JavaScript language version选择JSX Harmony
- FLex css3 新属性
- sentry for react native
- bugsnag for react native
- Add Crashlytics to your React Native iOS app CLS_LOG 在崩溃的时候把 console 日志显示出来
- react-native-fabric-crashlytics 利用 Crashlytics 记录 js 异常信息
生成 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