Skip to content

xinlc/react-native-typescript-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-typescript-template

Getting started guide

Installation

# react-native link
# react-native link @ant-design/icons-react-native
yarn install
cd ios & pod install

Usage

# Development server
yarn start

# Build dev
# APK in android/app/build/outputs/apk/
react-native run-android 

react-native run-ios

# Build release
bash scripts/android_build.sh [version] [index] [test|release]

Debugger

react-devtools
adb reverse tcp:8097 tcp:8097

adb devices
adb -s <device name> reverse tcp:8081 tcp:8081
adb reverse tcp:8081 tcp:8081

adb shell input keyevent 82

npm start -- --reset-cache

react-native log-ios
react-native log-android

VSCode

推荐安装:

  • ESLint
  • Prettier
  • TabNine
  • Reactjs code snippets
  • React-Native/React/Redux snippets for es6/es7
  • Project Manager
  • Search node_modules
  • Guides
  • Color Highlight
  • vscode-icons
  • Import Cose

添加配置如下:

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "typescript",
      "autoFix": true
    },
    {
      "language": "typescriptreact",
      "autoFix": true
    }
  ]

}

Documents