I'm very excited about this, but can someone <i>please</i> write something down? The videos are nice an all, but information-wise they're incredibly low-density. If I have an hour to spend on React Native, I'd rather read for 10 minutes and experiment for the remaining 50...
I'm curious about animations. That is one thing React hasn't <i>really</i> figured out on the web. I think the last experiment I saw was to do all the animations manually using component state. I wonder if this is the same on Native?<p>Ideally a cross pollination of ideas about animations would make both ecosystems better.
React Native is a cool project, but the deafening hype is slightly puzzling.<p>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.<p>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.<p>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.<p>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:<p><a href="https://news.ycombinator.com/item?id=8965044" rel="nofollow">https://news.ycombinator.com/item?id=8965044</a><p>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 <Map> and so on.)<p>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 <View> and <Image>). And, like all wrapper APIs, there is a degree of impedance mismatch between the underlying platform implementation and the cross-platform interface on top.<p>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.
Keep in mind that this is <i>NOT</i> (primarily) about cross platform application development. As the developers say, "Learn once, write anywhere".<p>It's about building native applications in the React style (declarative, componentised), with very rapid turnaround because much of your logic and layout is defined in JavaScript. Instead of recompiling your app's native code all the time, you're just reloading JavaScript within it.<p>It's possible that some components could be shared between platforms, but ultimately I think most of them will be different, reflecting the UI structure of the target environment. There's probably more scope for sharing higher level non-UI-element components.
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.<p>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?<p>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.
This looks really nice. One question that I've found conflicting information about - is JavaScriptCore JITed on iOS 8? I know it isn't on iOS 7 and earlier, my understanding was that it was on iOS 8 but it's hard to find a definitive answer. Anyone know?
The 5-minute demo at the end (22:24) is incredibly impressive: <a href="http://youtu.be/7rDsRXj9-cU?t=22m24s" rel="nofollow">http://youtu.be/7rDsRXj9-cU?t=22m24s</a><p>That just seems SO much easier, quicker, and more efficient than storyboarding and coding UIViews. I am very much looking forward to being able to play around with this and discover downsides, because there have to be some...right?
I see that they're using display:flex for layout, for <i>all</i> elements, which makes things like inline styles impossible or extremely inconvenient.<p><a href="http://jsfiddle.net/u8wd8kdL/5/" rel="nofollow">http://jsfiddle.net/u8wd8kdL/5/</a><p>If I am wrong, please provide me an example of how to layout that text with display:flex.
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.<p>"This is a native component".
"WOOOOOOOOH!!!" "YEAH!!" <high fives>
They picked a great timing for the announcement because I needed to use native components with a React app, similar to how Ejecta (<a href="http://impactjs.com/ejecta" rel="nofollow">http://impactjs.com/ejecta</a>) reimplemented the WebGL API to run js apps without DOM/WebView) but had settled with Cordova plugins because it would have taken probably too long to implement otherwise, so I have high hopes for React Native :)
Since I already know ObjC & Swift, the most interesting part of this is at 8:17. "What if we could server-side run native apps? ...we could do it".<p>Hmmmm.<p>An interesting idea, however Apple might have something to say about that (App Store Review Guidelines):<p>2.7 Apps that download code in any way or form will be rejected<p>2.8 Apps that install or launch other executable code will be rejected<p>Still...I like the idea of pushing the boundaries of native iOS development.
Has anyone who's seen the actual code comment?<p>From what I understood on the video, this is going to be distributed via a repo that is essentially already an iOS or Android template?<p>There wasn't much talk about the compilation process. Maybe the details (for the open source version) haven't been ironed out?
I've been down on "cross platform native apps" because they're always the lowest common denominator of the language and platform, but this looks intriguing.
The one thing that's prevented me from using flex-box is browser support.<p>Because flex-box has been re-implemented in JS, does this mean that the css-layout project [1] will provide flex-box support for older browsers?<p>I looked, but I couldn't find a "compatibility" section anywhere in the repo.<p>[1] <a href="https://github.com/facebook/css-layout" rel="nofollow">https://github.com/facebook/css-layout</a>
<a href="https://www.infinum.co/the-capsized-eight/articles/running-javascript-in-an-ios-application-with-javascriptcore" rel="nofollow">https://www.infinum.co/the-capsized-eight/articles/running-j...</a><p>This article have lot of details about how JS is getting executed on the Native platform. Lot of components are provided by Apple like JS VM
I get that people are excited, but it seems like time and time again these abstractions fail to solve the underlying problems.<p>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.
Seems like the time has come for the synergy of native + JavaScript. React.js are not the only ones working on it... Tabris.js works on a similar principle (combine the best of native and web) and offers features like instant debugging of JavaScript on your device. It's currently invite only.
I'm not sure I got how the Javascript code executing? For the case of Android, is the library spinning up a WebView to get access to the V8 engine?
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 ?<p>Also, the constraint solver could be a good riddance but is there going to be any support for uikit dynamics ?