News for hackers. Stuff that matters.
Re:A monthly release cadence for React Native by mewwts on Monday January 09, 2017 @02:29PM (#13359033)
React Native is great. Hands down, so cool to be able to go from developing websites to native apps. I also appreciate reading the release notes and seeing new features and fixes being released so frequently.

I do however experience real issues when upgrading. We tried going from 0.38 to 0.39, but getting the xcode project files to merge correctly has proved difficult for us, a couple of newbies. The new react-native-git-upgrade makes it easier to see the conflicts, but it is still hard for us to make it work. Does HN have any wisdom to share?

Re:A monthly release cadence for React Native by ariabuckles on Monday January 09, 2017 @03:08PM (#13359370)
My workflow so far (pre react-native-git-upgrade) has been to `git commit`, then run `react-native upgrade` and say yes to all the prompts, and then afterwards manually `git add -p` the changes that react native wanted to make to my files (the proposed changes made them "standard" and got rid of customizations, but also upgraded legacy parts from the original templates).

For each change, then, I try to upgrade any react-specific code while preserving my own changes to that file.

It's certainly cumbersome and I avoid doing it too often, but I've found this manageable.

Re:A monthly release cadence for React Native by k__ on Monday January 09, 2017 @02:39PM (#13359126)
Did the transition from React to React Native get easier on Android?

Last time I checkes, there was still rather much mobile know-how needed :/

Re:A monthly release cadence for React Native by sheeshkebab on Monday January 09, 2017 @02:54PM (#13359242)
React Native doesn't abstract mobile frameworks, so you still need to learn it all as far as iOS UIKit and Android SDK (and also learn React Native stuff on top of it).

That said, there is something about coding in mostly one language (javascript) vs 2 or 3 (Objc/Swift/Android) and also have that live app reloading.

In any case, this react stuff is not for beginners and won't make learning mobile platforms easier - you will still need to put in obligatory 10k hours to get good at mobile dev...

Re:A monthly release cadence for React Native by roboguy12 on Monday January 09, 2017 @04:48PM (#13360125)
Aside from the live reloading and being able to write in javascript as opposed to Swift/Java, the development paradigms of React is just better, IMO. The component-based design patterns and event-dispatching-based control flow just make so much more sense to me than the traditional Android/iOS way of doing things (I have experience in both the web and mobile). It's easier to test, easier to read/write, and easier to reason about. This is just opinion of course, others may not feel the same.
Re:A monthly release cadence for React Native by dean177 on Monday January 09, 2017 @02:45PM (#13359166)
Absolutely, if you already know react and are targeting Android only, picking up react-native will require minimal android knowledge, and the docs are great are walking you through the setup bits you need to get developing on-device.
Re:A monthly release cadence for React Native by oakesm9 on Monday January 09, 2017 @03:10PM (#13359381)
That's partly true, however as someone who uses React Native with multiple production apps, having "real" native experience is invaluable when using React Native. To create a good RN app you need to know how the system works and be comfortable jumping to the native side when needed. If you don't you're bound to create a sub-par app by trying to make everything fit into the web side which is all you know.

It is possible to create an app without native experience, but it is still needed to create a very good app.

Re:A monthly release cadence for React Native by sandGorgon on Monday January 09, 2017 @04:02PM (#13359762)
we have been struggling with the idea if whether to start using react native in our current production android app.

what is a good balance between RN vs pure native? what works and what doesn't?

what about other considerations like power consumption..file size, etc?

Re:A monthly release cadence for React Native by hafor on Monday January 09, 2017 @06:58PM (#13361187)
In terms of how much React/JavaScript code you should expect to write vs. how much Native code for a production app, it obviously depends a lot on the app but maybe 80/20 might be a reasonable (if totally arbitrary) expectation.

Here's a good high-level talk which touches on the balance somewhat: https://www.youtube.com/watch?v=abSNo2P9mMM.

You should only expect to write pure native code when you hit a performance barrier with some particular custom component you're creating and there isn't an existing JS api or a standard/3rd party component which does everything you need already. But when you do hit this barrier, wiring up your own natively implemented module is pretty straightforward.