openGeeksLab / travelgems-frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requirements

React Native Installation

  • Install nvm(for macOs or Linux) or nvm for windows
  • Install latest version of node on nvm and use it.
    nvm install nodcom.examplee
    
    nvm list
    
    nvm use <VERSION>
  • Install Xcode for iOS
  • Install JDK
  • Install Android Studio and create a device
  • Dont forget to set ANDROID_HOME environment variable to SDK versions
  • (Optional but suggested) Install yarn
  • Install react-native-cli
    npm install -g react-native-cli
  • Install watchman
    brew install watchman

See Getting Started to install requirement tools.

Libraries

HOW DO I INSTALL A LIBRARY?

  • npm install --save <package_name>
  • npm link <package_name>
  • To install all the packages included in package.json file simple run:
  • npm install
  • npm link

DEVELOPERS TOOLS

First Clone Installation

  • npm install
  • react-native link

Commands

  • create a new app : react-native init <project_name>
  • run on ios simulator : react-native run-ios
  • run on android simulator or device: react-native run-android
  • open android emulator (Mac): /Users/<user>/Library/Android/sdk/tools/emulator -avd <emulator_name (e.g. Nexus_5X_API_24)> -port 5554

Debugging

  • Open mobile dev tools for Android with CMD + m (on Mac)
    adb shell input keyevent 82
  • Use React Native Debugger on Mac or check bellow on Windows
  • Inspect DOM with react devtools (enable inspector from dev tools)
    react-devtools
  • Enable remote debugging by clicking "Remote JS Debugging" from dev tools
  • For network debugging open reactotron

Reading Materials

Common Issues

  • Android run "Device not found":
      chmod 755 android/gradlew
    
  • Clean Install project
    rm -rf ios/build
    rm -rf android/build
    watchman watch-del-all
    rm -rf node_modules && npm install
    rm -fr $TMPDIR/react-*
    react-native link
    

About


Languages

Language:JavaScript 95.5%Language:Shell 1.9%Language:Objective-C 1.4%Language:Java 0.6%Language:Python 0.5%