项目作者: ctlabvn

项目描述 :
Agiletech React Native Starter Kits
高级语言: JavaScript
项目地址: git://github.com/ctlabvn/ReactNativeStarterKits.git
创建时间: 2017-08-23T15:04:43Z
项目社区:https://github.com/ctlabvn/ReactNativeStarterKits

开源协议:MIT License

下载


ReactNativeStarterKit

Another simple, powerful starter kit for real life project.

Screen shot

Home
Drawer Menu

Dependencies

  • react-native-vector-icons
  • native-base
  • agiletech-navigation // build-in
  • redux, react-redux, redux-logger, redux-saga, redux-form, redux-persist
  • lodash, color, apisauce
  • react-native-progress
  • react-native-progress-image
  • react-native-image-picker
  • react-native-splash-screen
  • iPhoneX supported

Folder structure

  1. /src
  2. /assets project resource files
  3. /components All related component
  4. /Afternteractions You should not care about this
  5. /Header
  6. /Footer
  7. /Navigator Navigator
  8. /SideBar
  9. options.js All SideBar items
  10. /Toast
  11. /Image Custom Image with progress
  12. /ProgressImage Progess image build-in
  13. /Gallery Gallery
  14. /Browser Inapp-browser
  15. /elements Dump component without state
  16. /constants App constants
  17. /container App screens
  18. /store App store/action/reducer/saga/api
  19. /actions Actions
  20. /api API
  21. /reducers Reducers
  22. /saga Sagas
  23. /selectors State selectors
  24. /theme NativeBase theme
  25. App.js App root
  26. routes.js Router configuration
  27. index.js Root Component (RN 49+)

Setup project

  1. git clone https://gitlab.com/anhtuank7c/ReactNativeStarterKits.git example
  2. cd example && yarn
  3. react-native-rename example -b vn.agiletech.example
  4. yarn ios|android or react-native run-ios|run-android as usual
  • Remember to change persist keyPrefix in ~/store/index.js line 25

npm shortcut

Run project

  1. yarn android
  2. yarn ios

Build, Install APK

  1. // build apk
  2. yarn ba
  3. // install apk to android after build
  4. yarn ia
  5. // run reverse
  6. yarn adb-reverse

Generate icon and splash screen

We already have design.sketch template file

  1. // install tool
  2. brew install imagemagick
  3. npm install -g yo generator-rn-toolbox
  4. // generate splash screen images
  5. yo rn-toolbox:assets --icon icon.png --splash splash.png --store
  • splash.png: square 2048x2048
  • icon.png: square 512x512

Integrate Map

Guide here