Live data from Hacker News

A Deep Dive on React Native [video]

youtube.com

11–20 of 72 posts

Re: A Deep Dive on React Native [video]

#12
post #4

Earlier quoted context omitted.

The new webkit view (WKWebView) is JITed. I'm not sure about using JavaScriptCore independently of it though.

JavaScriptCore isn't JITed, even on iOS 8.

Pretty sure I heard them say exactly that it was at WWDC. I wrote it down in my notes anyway. ~04:30 in the WWDC video "Introducing the Modern WebKIT API"

It was stated it used 4th tier LLVM JIT (FTL) [0]. Do you have evidence to the contrary? What did you do to test? If you can outline what you did I will be happy to help out and investigate.

[0]: https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-...

Re: A Deep Dive on React Native [video]

#13
post #4

Earlier quoted context omitted.

JavaScriptCore isn't JITed, even on iOS 8.

Pretty sure I heard them say exactly that it was at WWDC. I wrote it down in my notes anyway. ~04:30 in the WWDC video "Introducing the Modern WebKIT API" It was stated it used 4th tier LLVM JIT (FTL) [0]. Do you have evidence to the contrary? What did you do to test? If you can outline what you did I will be happy to help out and investigate. [0]: https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-...

Sorry, you probably misunderstood me – WKWebView runs in a separate process and does have a JIT (discussed in that video); JavaScriptCore runs in the same process and does not.

Re: A Deep Dive on React Native [video]

#14
post #7
post #5

I'm definitely interested in seeing what React, and React Native, can do, but I have to say these people cheering like Ofrah just gave them a free car are kind of turning me off. "This is a native component". "WOOOOOOOOH!!!" "YEAH!!"

It's a speech. People cheer during speeches. Also, it's pretty mind blowing that they're actually calling native components from JS if you ask me.

It is rendered native (described in js) not in a webview. Otherwise they should call it web components.

Re: A Deep Dive on React Native [video]

#15
I get that people are excited, but it seems like time and time again these abstractions fail to solve the underlying problems.

It's like how we never got a fix for making cross platform applications. And regardless how much people wants the new way of doing things to work, the results speak for themselves. Atom, the editor, can't even handle window re-sizing smoothly.

Re: A Deep Dive on React Native [video]

#16
i'm not using react for the web so maybe this is a silly question, but how do you pass data from your obj-c controllers ( or any native object) to those reactjs views ?

Also, the constraint solver could be a good riddance but is there going to be any support for uikit dynamics ?

Re: A Deep Dive on React Native [video]

#17
All of this looks great and I'll give it a try as soon as I get some spare time, but there are a couple of things I didn't understand.

1) Is this cross platform or are you still going to have separate code bases for the UIs of iOS and Android? Looking at the code in the demo there are components like View, Text and Image. As basic as they are, are they the same on iOS and Android (same behaviour, same arguments)? It was pretty clear from the first minutes of the video that View is build on top of the native view of iOS (he showed the objC code). Is that React code building for Android?

2) I guess that one must still be proficient in iOS and Android, unless they make the monumental job of rewriting all the iOS and Android documentation for the React components they implemented. I expect to have to reference the native docs to understand the meaning of the arguments and do the job of mapping React to native. That has always been a pain point in many UI abstraction layers.

Re: A Deep Dive on React Native [video]

#18
React Native is a cool project, but the deafening hype is slightly puzzling.

Creating and calling native UI components from JavaScript is nothing special in itself. It's obviously possible to do it from JS just as well as from any other language -- you just need to provide the API. There you have two choices: either a bridge that translates the native API directly, or a wrapper class hierarchy.

Examples of bridges include Xamarin's Mono that lets you build iOS user interfaces in C# code, and RubyMotion that lets you build Mac UIs in Ruby. Because these are bridges, the entire Cocoa API is exposed. The downside is that the bridge does nothing to smooth over platform differences: you can write in C# on all platforms, but you still have to learn Cocoa.

A prominent example of a wrapper API is Titanium Appcelerator that lets you build cross-platform mobile apps. Another good example is GTK+ for desktop apps: it's smart enough to leverage native Windows components where possible, but the GTK+ API is higher level than that of native Win32.

React Native is primarily in the latter category. Based on jordwalke's comment in another HN thread, they currently have cross-platform wrappers for View and Image:

https://news.ycombinator.com/item?id=8965044

But it appears you can also create platform-specific views, and for that they presumably have some kind of bridge. (It could also be that they provide manually written wrappers for platform-specific views, e.g. UIMapView becomes a and so on.)

In sum: React Native doesn't magically translate your JS+HTML app into a cross-platform native app. They're a long way off from having a full cross-platform API (unless your app is so simple that it can be described in terms of and ). And, like all wrapper APIs, there is a degree of impedance mismatch between the underlying platform implementation and the cross-platform interface on top.

There's a lot to like about React Native, though. The layout model and binding logic seems cool. The React team's accomplishments in the browser environment are impressive. With time, React Native could become for mobile what Qt is on the desktop -- and that's high praise in my books.

Re: A Deep Dive on React Native [video]

#19
post #17

All of this looks great and I'll give it a try as soon as I get some spare time, but there are a couple of things I didn't understand. 1) Is this cross platform or are you still going to have separate code bases for the UIs of iOS and Android? Looking at the code in the demo there are components like View, Text and Image. As basic as they are, are they the same on iOS and Android (same behaviour, same arguments)? It…

Based off of the learn once write anywhere idea they put forth in the video the codebases will be separate. I think what they were trying to solve is the the issue that currently you need to learn multiple layout engines (CSS, iOS, Android) as well as the different model-view patterns from each platform. Now you can just get really good at React and that will help your productivity on all platforms.

Re: A Deep Dive on React Native [video]

#20
post #18

React Native is a cool project, but the deafening hype is slightly puzzling. Creating and calling native UI components from JavaScript is nothing special in itself. It's obviously possible to do it from JS just as well as from any other language -- you just need to provide the API. There you have two choices: either a bridge that translates the native API directly, or a wrapper class hierarchy. Examples of bridges in…

It doesn't seem like they're trying to help you write a cross platform app that shares the majority of its codebase like Xamarin. I think they're trying to make it so React's data flow model is the only one you'll need to be good at and it will increase your productivity no matter what platform you're working on.
Post reply on HN