Interestingly, this comment, while probably being of the most technical detail / value in the thread, was downvoted by someone :)
what's wrong with -webkit-overflow-scrolling: touch? doing scrolling in js is so last year.
Re:First Impressions Using React Native
by peterhunt on Friday February 06, 2015 @10:02PM
(#9012907)
You can't build the equivalent of UITableView (which is a very important component in almost any iOS app) without frame-by-frame scroll events.
Re:First Impressions Using React Native
by akrymski on Saturday February 07, 2015 @06:52AM
(#9013729)
How so? Which feature of the UITableView can not be replicated in JS? I'm struggle to think of one. Swipe left/right to remove rows in a table can be done with touch events.
What am I missing?
Re:First Impressions Using React Native
by jordwalke on Saturday February 07, 2015 @01:28PM
(#9014806)
I think you're not being specific enough. I am claiming they can perfectly be recreated in JS, just not within a mobile browser at the moment.
Re:First Impressions Using React Native
by akrymski on Saturday February 07, 2015 @05:36PM
(#9015569)
I do mean within a mobile browser. We have a pretty large app inside Cordova, and I've yet to get stuck where there's something I can't recreate. Would be interesting to see an example where a mobile browser falls short.
Re:First Impressions Using React Native
by peterhunt on Monday February 09, 2015 @06:47PM
(#9024572)
Right, but then you're susceptible to animation stutter and you have to reinvent the look-and-feel of the platform, which is extremely difficult.
Re:First Impressions Using React Native
by jordwalke on Saturday February 07, 2015 @03:28AM
(#9013464)
Exactly. Customizing exactly how a header bar "sticks" to the top when it hits a certain point, cannot be done with any built in browser scroller. The same is true of any animation that should happen in sync with the scrolling itself (think like a parallax fade/scale animation etc).
Re:First Impressions Using React Native
by akrymski on Saturday February 07, 2015 @06:57AM
(#9013733)
What most apps need can be done by listening to touch events instead of scroll events. Eg hiding the top bar when user started scrolling down and so on.
I can't even think of an app that has a parallax effect. If your app is required to have complex animations then web tech is not the right tech choice in general imo
Now of course, I had hand optimized the performance, but my point is that on the web, there was nothing I could do, and with React Native, there was something I could do to make animations smooth. This is not to say you should be doing animations in JS, but if you want highly customizable interactions that can be immediately stopped by a touch processed in JS, you should try it out and see how it feels. For things that are "fire and forget", or platform specific, you should try using CoreAnimation/keyframes etc which protects the animation from your business logic.