0

To me a mobile cross platform framework is node.js + sencha touch. You write business logic with node.js, sencha touch for mobile ui.Then you can build this code base to native ios or android. I think under the hood, it use Phonegap to build. So how does this work with React Native. I read that there are React Native for IOS and React Native for Android. Are there two code base? For example, let say I have need to write a mobile app display currency and time zone base on location. With this app, there are two requirements

  1. Same business logic for get timezone and currency base on location. Do not want to have these logic in two places for Android and IOS.
  2. Two UI view. 1 for android, and 1 for IOS. Are these what react native for IOS and for Android distinct themself?

How many codebase do I need to have two write such an app as above?

1 Answer 1

3

As far as I know react-native is all about

"learn once - write everywhere"

and to

enable you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React.

You can write code for apps with single (JavaScript) codebase. + You can have different UI views, even in same JS file (even tho it's recommended to split them in two JS files ending with .ios.js and .android.js and they will be smartly used for IOS from .ios.js and for android from .android.js file).

If you decide to go with react-native here is official documentation: https://facebook.github.io/react-native/ . And here you have tutorials, basic (starter) components and other helpful stuffs https://github.com/jondot/awesome-react-native#tutorials .

Few articles for writing cross-platform apps with react-native:

Hope it helps :)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.