News for hackers. Stuff that matters.
Re:React Native for OS X by weixiyen on Wednesday March 30, 2016 @03:28AM (#11387527)
It's really odd to read your comment and the parent comment, at least regarding the iOS side of things.

I've gotten my RN app to run at the same performance level (as far as the user is concerned) as my native app and there are definitely some non-trivial animations and gesture responders for the RN version.

It did take some tuning and I had to add a couple artificial delays to wait for animations to finish, but nothing crazy.

No opinion on Android yet, but RN for iOS is definitely not negatively impacting the user experience in my case.

It's not in the store yet, but to give you an idea of the UI complexity level - see Slack and Google Chrome's UI and gestures.

Re:React Native for OS X by briandear on Wednesday March 30, 2016 @03:49AM (#11387592)
"As far as the user is concerned.." What exactly does that mean? How do you benchmark that? Or are you just guessing?
Re:React Native for OS X by weixiyen on Wednesday March 30, 2016 @04:00AM (#11387632)
It means that the transitions between RN and Native for most cases are visually indistinguishable to the end user. Of course there are potential differences "under the hood" simply b/c the animations are implemented differently.

It's possible that the OPs ran into certain issues with specific cases or weren't able to figure out a workaround even though solutions exist, but the result of their comments unintentionally create FUD.

I'll give an example. One of the most popular libraries for messenger apps to use in RN is GiftedMessenger, but it's actually doing the keyboard wrong, so people may get the misconception that ReactNative doesn't support smooth keyboard animations, which is not true. There are a lot of examples like this, not meaning to pick on anything specific.

I will say that the library ecosystem around RN doesn't feel mature yet, kind of like Node.js in the early days, but React-Native itself is not the issue.

Re:React Native for OS X by teacup50 on Wednesday March 30, 2016 @12:07PM (#11390286)
If you require more CPU cycles to do it, then it's not indistinguishable, even if it actually winds up being visually indistinguishable.

It drains more battery, it leaves less CPU for other operations, etc.

Re:React Native for OS X by lowboy on Wednesday March 30, 2016 @12:20PM (#11390400)
Indistinguishable as far as the user is concerned. I'm guessing most users won't ascribe any battery or CPU degradation to a new app, unless they spend half their day on it.
Re:React Native for OS X by LeoNatan25 on Wednesday March 30, 2016 @04:14AM (#11387707)
I have very high doubts that they are "visually indistinguishable". Did you time animations exactly? Did you give the animations the same easing function exactly? Also, what happens when iOS 10 comes, and tweaks these values?

No, the user always feels. Even the grandmas and grandpas, that are far away from technology as possible, feel it in the back of their mind. They know something is "off".

Also, adding "artificial delays" to wait for animation end is a sign of a terrible terrible animation system.

Re:React Native for OS X by weixiyen on Wednesday March 30, 2016 @04:37AM (#11387807)
> I have very high doubts that they are "visually indistinguishable"

It's hard to describe without showing you in person and asking you to tell me which app is a RN app vs native, but it's actually the case... There's pretty granular control over the easing functions and the default ones do match the iOS curves.

I was a designer before being an engineer, and I was immersed in Obj-C for 4 years before trying React Native. On the well-implemented React Native apps, it really truly is indistinguishable.

Re:React Native for OS X by afarrell on Wednesday March 30, 2016 @05:00AM (#11387922)
Perhaps the difference here is between a RN app written by someone with only a web/js background and a RN app written by someone who has a deeper understanding of the system beneath RN's abstraction layer?
Re:React Native for OS X by weixiyen on Wednesday March 30, 2016 @07:09AM (#11388399)
That's not what I meant. It's got the right easing curves out of the box for most transitions. Sorry for the confusion. But there are definitely some things that take a little more digging around as the documentation doesn't exactly offer "best practice" recommendations in all cases.

It does help to read obj-c code in the RN repo to see what's possible and how things work so you use the right javascript parameters, but you don't normally have to do additional obj-c coding most of the time.

Re:React Native for OS X by afarrell on Wednesday March 30, 2016 @08:03AM (#11388619)
Yea, I'm offering a bit of a different point than you.

You're saying that that it is easy to use RN to build an app that is indistinguishable from an app written in obj-c

I'm offering the possibility that your 4 years of obj-c experience trained you to make intuitive judgements about how things should be done and that this intuition is mostly correct. Also that a person without that experience wouldn't make those same judgements and might default to doing things in a lower-fidelity way.

This suggestion is offered without experience using either react native, obj-c, or swift. So coming from ignorance, I might be entirely wrong.

Re:React Native for OS X by coldtea on Wednesday March 30, 2016 @10:25AM (#11389462)
>No, the user always feels. Even the grandmas and grandpas, that are far away from technology as possible, feel it in the back of their mind. They know something is "off".

If it's below a certain ms (milliseconds) threshold the user does not "feel". There's nothing more or less to it besides simple physiology.