ReactNative实现跨平台移动APP开发。此project只是个简单demo。
- AppRegistry ReactNative应用入口。registerComponent注册根组件
- TouchableOpacity, TouchableHighlight 可触控组件
react-native start
react-native run-android
Android Studio
环境搭建
npm install -g yarn react-native-cli
react-native init MyApp
yarn add react-navigation react-native-gesture-handler react-navigation-stack
yarn add react-navigation-material-bottom-tabs react-native-paper
yarn add react-native-elements react-native-vector-icons
yarn add react-dom react-native-web
-
error Invalid regular expression: /(.\fixtures\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture\bundle.js|.\tests\.)/: Unterminated character class SyntaxError: Invalid regular expression: /(.\fixtures\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture\bundle.js|.\tests\.)$/: Unterminated character class
- node 使用v12.10.0
- 修改 \node_modules\metro-config\src\defaults\blacklist.js 详细