Re:React Native for Android
by vickychijwani on Monday September 14, 2015 @04:12PM
(#10217187)
> But if you have the foundation and know the native platform, why jump ship to JS at all?
I'm a (native) Android and JS developer. The primary reason I'm excited about React Native is that I don't have to go through the tedious compile-install cycle for every little UI change. React Native will make prototyping/iterating on Android as easy as it is on the web. However my reasoning assumes that there will be almost no friction in terms of creating complex views in React Native. I'm curious to see if that pans out.
Not having used ReactNative before, how would that change? Wouldn't you still have to at least redeploy the app to the phone if you change the JS?
Re:React Native for Android
by vickychijwani on Monday September 14, 2015 @05:59PM
(#10217791)
> Wouldn't you still have to at least redeploy the app to the phone if you change the JS?
No, that's the beauty of it. All you need to do is shake your phone and tap the "Reload JS" option. Those JS files are served by some sort of a server that starts up on your dev machine when you first deploy the app. See https://facebook.github.io/react-native/docs/tutorial.html#d... (search for "reload js").
I assume this is only in dev mode, as opposed to release mode?
Actually no, POCs have been made which allow you to deploy setups which allow for live updating apps in production. Apple even allows RCE as long as it's executed in the JS engine.
Got any sources for that? I've not found a single example of a react android app that shows "live updating apps in production". I'm talking about things like loading code seamlessly in the background from a CDN. There are examples for iOS though
Quite right. It's true that if you don't have a background using the native libraries it's going to be difficult, so one approach would be talking to developers who do and doing research like reading blogs and discussions like this one...
There's the rub. If you don't know anything about the native platform then you "don't know what you don't know". The NativeScript demo shows how to pull in a native ObjC function (a string related method I think), but if you start with no background in the native libraries how would you even know when you could be leveraging a native library function instead of trying to recreate a sub-optimal approximation in JS. But if you have the foundation and know the native platform, why jump ship to JS at all? And then I'm right back where I started :)