A Deep Dive on React Native [video]
11–20 of 72 posts
Re: A Deep Dive on React Native [video]
#12Earlier 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.
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]
#13Earlier 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-...
Re: A Deep Dive on React Native [video]
#14I'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.
Re: A Deep Dive on React Native [video]
#15It'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]
#16Also, 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]
#171) 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]
#18Creating 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]
#19All 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…
Re: A Deep Dive on React Native [video]
#20React 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…