Skip to content

Instantly share code, notes, and snippets.

@mwenger1
Last active December 28, 2017 18:58
Show Gist options
  • Save mwenger1/8a5d54749d611e6f09948bdea1b2852f to your computer and use it in GitHub Desktop.
Save mwenger1/8a5d54749d611e6f09948bdea1b2852f to your computer and use it in GitHub Desktop.
ReactNativeReference.md

Starting a new project

  • Run react-native-template. Reference commit shaw in first commit message
  • react-native-git-upgrade
  • yarn upgrade interactive
  • Build app in xcode usine iphone SE (ensured well designed for smallest screen)
  • Add app icon images with generator-toolbox
  • Open Android emulator. /Users/janedo/Library/Android/sdk/tools/emulator -list-avds and then /Users/janedoe/Library/Android/sdk/tools/emulator -avd DEVICE_TYPE -netdelay none -netspeed full
  • Build app for Android react-native run-android. May need to create an android/local.properties file
  • Build app to personal iphone. May require team provisioning profile
  • Deploy to TestFlight using fastlane

Packages to Consider

  • styled-components
  • redux-persist
  • react-native-swiper
  • react-native-elements
  • react-native-config
  • react-native-action-sheet

Tooling

npm install -g react-devtools
http://remotedev.io/local/
open -a xcode ios

Setup

* `module-resolver` babel plugin
* Create a single components file to export all components
* Api client manager.  app/lib/api/base.js
* Normalizr gem - 
* Add types/index.js file that maintains all PropTypes
* User prettier package for formatting
* react-native-localization for internationalization
* app/styles.js to store variables grouped by object. GlobalStyles and Colors, and Sizes
* Use redux-persist to persist log in information

Debugging

AsyncStorage.clear() // clear redux persistence
console.ignoredYellowBox = ['Remote debugger']; // ignore yellow debugger
npm start -- --reset-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment