Sergey80 / myReactNativeApp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

myReactNativeApp

Motivation (feel free to skip)

Me, personally I would be happier if I could use Scala as language for building Native Mobile App.

And I could if was interested to create an app only for Andorid, but that is not a case - I need both.

In any event, with tools like TypeScript and babeljs.io and good IDE help, things are not that dramatically bad, so it make sense to try it out.

And JS and React JS/Native by far has many features that are ready to work out of the box, with great/large community. For now it is much closer to real world. So be it.

  • Q: Why not Native Script with Angular and Typescript?
  • A: Good question. I still hope to reuse React way of building for the Web, with scalajs-react (when day comes :) ).

Intention

The intention is:

  • to play with / try ReactNative myself, put some notes so it could be useful and reusablef or me and for others (optional)
  • initially the app was created from webstorm template

To install

  1. install android sdk
  • make sure android virtual device is there
  • android avd - to run virtual device (where our app will appear when we start it)

To run

So far it is simple (I play with Android for now)

  1. Make sure your phone simulator is on
  2. Run app from IDE (advantage is to be able to debug from IDE)
  3. To debug:
  1. Alternative way to start, from Terminal:
  • android avd (runs your virtual device)
  • react-native start (packager)
  • react-native run-android (will run your app in the emulator or on real device)

Nice tutorial to follow

  1. https://www.youtube.com/watch?v=mkualZPRZCs (to start)
  2. https://youtu.be/WrDwSRu8oz8?t=60 (Redux, best I could find!)

Screen

Sample app screen shot

Run On Real device

  1. For Android on Linux

Redux (because 'our code must manage more state than ever before')

To read: - http://redux.js.org/docs/introduction/ - https://medium.com/@bosung90/how-to-structure-your-react-native-application-using-redux-aec1677b76ca

So to install redux dependencies:

  • npm install --save react-redux
  • npm install --save redux
  • npm install --save redux-logger
  • npm install --save redux-thunk (for async calls) (that all will modify our package.json)

About


Languages

Language:JavaScript 60.1%Language:Objective-C 23.6%Language:Python 9.2%Language:Java 7.1%