Live data from Hacker News

Use ReactJS to Build Native Apps

twitter.com

31–40 of 175 posts

Re: Use ReactJS to Build Native Apps

#31
post #12
post #8

I would love to see React added to mobile app frameworks like Apache Cordova.

You can use ReactJS now with Cordova/PhoneGap - no problemo. This announcement is about replacing html elements (div, h1, img, etc.) with native elements. Should be faster going native than via web elements.

So does it use PhoneGap or something like it?

Re: Use ReactJS to Build Native Apps

#32
post #20

This is awesome news. I've been working on a desktop application using React, node-webkit and browserify and it's been a great development experience. Being able to leverage web technologies to build native apps has been a huge time saver. However, I'm relying on the NodeJS components in order to do things like access the file system and fork commands. I'm wondering how React Native will handle this functionality. Wi…

Native APIs are exposed as JS modules. And XHR, for example, is polyfilled in terms of whatever native capability exposed. You can totally use npm modules, provided any module that it uses is polyfilled.

Re: Use ReactJS to Build Native Apps

#33

Hi, I'm Jordan from the React team. I'm happy to answer any questions about React Native, but @vjeux will be giving a more thorough talk tomorrow that you won't want to miss (if you're at ReactJSConf), so I might wait for him to answer some of them. This is not the DOM. This is not a web view. If you know ReactJS, you can build native apps with React Native.

Hi Jordan, when you say native apps what platform(s) will it be possible to target? E.g. windows, osx, ios, android etc?

Re: Use ReactJS to Build Native Apps

#34

Hi, I'm Jordan from the React team. I'm happy to answer any questions about React Native, but @vjeux will be giving a more thorough talk tomorrow that you won't want to miss (if you're at ReactJSConf), so I might wait for him to answer some of them. This is not the DOM. This is not a web view. If you know ReactJS, you can build native apps with React Native.

Can you let us know a bit more about what this is? Native to what? Android / iOS? Desktops?

Does it allow you to render native components with JSX as opposed to only DOM elements? Can you mix the two, somehow?

Re: Use ReactJS to Build Native Apps

#35
post #30
post #24

Earlier quoted context omitted.

Instead of having React render to the DOM it renders to Native views. Be it iOS, or Android.

I doubt it would happen at runtime in iOS/Android, though? They would need to ship a JS interpreter that gets run on application startup, parse the React files, instantiate the native controls and create a bridge between them back to the JS interpreter? Well on second thought I guess Appcelerator Titanium does something similar. So it's native UI only, but with the added overhead (JS interpreter + bridge, larger bina…

Depends. There could be a build step that compiles all that logic. Or there could indeed by a JS runtime.

Re: Use ReactJS to Build Native Apps

#38

Hi, I'm Jordan from the React team. I'm happy to answer any questions about React Native, but @vjeux will be giving a more thorough talk tomorrow that you won't want to miss (if you're at ReactJSConf), so I might wait for him to answer some of them. This is not the DOM. This is not a web view. If you know ReactJS, you can build native apps with React Native.

Does it run using JavaScriptCore? Can we implement something like Hot Module Replacement a la react-hot-loader[1] for it?

I dreaded my Xamarin build times..

[1]: http://gaearon.github.io/react-hot-loader/

Re: Use ReactJS to Build Native Apps

#39

This is massive. Some more details: "React Native: everything native, controlled by async batched JS put in a background thread. Learn once, write everywhere. #reactjsconf" [1] "Fb groups app in iOS App Store is powered by it #reactjsconf" [2] "iOS and Android native using all the same ideas as React, all the power of native." [3] React has been gaining traction as I'm sure we're all aware, but this is next-level stu…

"learn once, write everywhere" - I like the sound of that! But I guess in the spirit of React this is still only the "V" in MVC right? I don't suppose they are planning to broaden the scope to anything other than rendering views. So if you want to use this to build native apps, I guess you are going to have to integrate another cross-platform solution for storage/sensor APIs?

Re: Use ReactJS to Build Native Apps

#40

Hi, I'm Jordan from the React team. I'm happy to answer any questions about React Native, but @vjeux will be giving a more thorough talk tomorrow that you won't want to miss (if you're at ReactJSConf), so I might wait for him to answer some of them. This is not the DOM. This is not a web view. If you know ReactJS, you can build native apps with React Native.

There will be more detail tomorrow, but at a high level:

* JS engine on a background thread

* Communicates via batched, async messaging protocol to a native (objc or android) server running on the main thread (basically create_view(), update_view(), destroy_view(), on_event() etc)

* Plug-in for React that speaks that protocol

* Tools to make cross-platform dev a bit easier (standard text component, cross-platform flexbox layout system)

* Designed to take advantage of native platform views, NOT be the next Java Swing

Post reply on HN