Skip to content

maminio/GalleryApp

Repository files navigation

Gallery App

First React native app @KCLTech PlusOne

Installation

Checkout project

git clone https://github.com/maminio/GalleryApp.git

macOS

  • Install dependencies brew install node watchman
    • Make sure you have node version 4 or newer
  • Install react-native npm install -g react-native-cli
iOS

Windows

  • echo "sdk.dir = C:\\Users\\$(whoami)\\AppData\\Local\\Android\\sdk" > android/local.properties

    • Make sure you have node version 4 or newer
  • Install react-native npm install -g react-native-cli

Android

Yarn

Fast, reliable, and secure dependency management

Install module

yarn add MODULE_NAME


#### Re-install module

yarn add --force MODULE_NAME

Remove module

yarn remove MODULE_NAME

Clear cache

yarn cache clean

Re-install all modules

rm -rf node_modules && yarn cache clean && yarn install

Debugging

Android problem

In my case the issue was that the emulator was making a request to:

http://10.0.2.2:8081/debugger-ui

instead of:

http://localhost:8081/debugger-ui and the request was failing.

To solve the issue: Before enabling remote debugging on your emulator, open http://localhost:8081/debugger-ui in chrome. Then enable remote debugging and go back to the chrome page where you should see your console logs.

Remote debugger

https://github.com/jhen0409/react-native-debugger

https://github.com/jhen0409/react-native-debugger/blob/master/docs/getting-started.md

open "rndebugger://set-debugger-loc?host=localhost&port=8081"

Logs

react-native log-ios

Cache

watchman watch-del-all && rm -rf node_modules && yarn install && rm -fr $TMPDIR/react-* && npm start -- --reset-cache

About

KCLTech Road to full-stack Workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published