/MobileAppDemo

使用React Native实现跨平台移动APP开发

Primary LanguageJavaScript

React Native

ReactNative实现跨平台移动APP开发。此project只是个简单demo。

简介

React React-Native

  1. AppRegistry ReactNative应用入口。registerComponent注册根组件
  2. TouchableOpacity, TouchableHighlight 可触控组件

react-navigation

Redux

How to run

react-native start
react-native run-android

Requirement

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

难点记录

  1. 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

    1. node 使用v12.10.0
    2. 修改 \node_modules\metro-config\src\defaults\blacklist.js 详细

Demo演示

image image