React Native is like React, but it uses native components instead of web components as building blocks.
History
版本 | 时间 |
---|---|
v0.64 | 2021-05 |
v0.63 | 2020-07 |
v0.62 | 2020-05 |
v0.61 | 2019-08 |
v0.60 | 2019-07 |
v0.59 | 2019-05 |
v0.58 | 2019-02 |
v0.57 | 2018-09 |
A brief history of React Native
创建项目
Creating a new application
1 | npx react-native init AwesomeProject [--version 0.57] |
Starts Metro Bundler
1 | npx react-native start |
Start application
1 | npx react-native run-android |
Debug
- Press the
R
key twice or select Reload from the Developer Menu (Ctrl + M
) to see your changes! - Before enabling remote debugging on your emulator, open
http://localhost:8081/debugger-ui
in chrome.
Creating a release build in Android Studio
1 | react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ |
Developing mobile apps with React Native in WebStorm
异常处理
YellowBoxList Error when starting
1 | react-native start --reset-cache |