Live data from Hacker News

Use ReactJS to Build Native Apps

twitter.com

61–70 of 175 posts

Re: Use ReactJS to Build Native Apps

#61

As someone who is just getting into iOS dev is there any benefit (that's at least known at this point) to using React over Swift for UI?

Possible portability to Android -- might take some work, but much less than it would be to port Swift.

From an architecture point-of-view, there is ReactCocoa.

Re: Use ReactJS to Build Native Apps

#63

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.

are you targeting arm platform support as well? I'm interested to know if any plans to have it on embedded devices.

Re: Use ReactJS to Build Native Apps

#64

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 fle…

Please, please have constraint-based layout support- I know you want to have it, given your work on react-gss :-)

Re: Use ReactJS to Build Native Apps

#65

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?

React is much more than just the V in MVC. It sells itself in that way for presenting the ability of being just exactly that. Thus, it can quite easily coexist with other frameworks. I actually think the established and well known selling points of React, like the Virtual DOM and "V in MVC" are just very nice side effects. The most important thing is the concepts and principles adopted from FRP, which in my opinion makes React a very powerful tool for JavaScript in general, a local optima of what can be done with JS right now.

Re: Use ReactJS to Build Native Apps

#66

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/

Yes, that should be possible – it loads JS packages from a custom server right now but there's no reason it can't use Webpack. You'll be able to reload immediately (without recompiling) already by pressing Cmd-R in the simulator.

Re: Use ReactJS to Build Native Apps

#69
post #66

Earlier quoted context omitted.

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/

Yes, that should be possible – it loads JS packages from a custom server right now but there's no reason it can't use Webpack. You'll be able to reload immediately (without recompiling) already by pressing Cmd-R in the simulator.

Oh that's sooooo great. Thank you.

Re: Use ReactJS to Build Native Apps

#70

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?

React has, from day one, sought to liberate itself from the underlying low level building blocks of a particular environment. There were always good reasons to so (normalizing browser inconsistencies etc). There is another benefit of the specific way in which we've built this library level layer of abstraction - we've formed a serializable boundary that allows vanilla React to sit on one side, and any set of lower level building blocks on the other. Before today, we simply had the DOM renderers sitting on the other side of that boundary. React Native replaces the DOM renderers with native renderers which allows people to render platform // instead of /. Other than that, you get to use the exact same React API that you already know (even down to the event bubbling). You can bridge to things that are only available on the platform, and can in general make higher performance granular building blocks that cannot be accomplished with web technology (such as components that decode images more efficiently or with different concurrency models). As with everything, JSX is not required to take advantage of this - and you can use any of the compile-to-js languages that you use with React today.
Post reply on HN