Live data from Hacker News

Use ReactJS to Build Native Apps

twitter.com

131–140 of 175 posts

Re: Use ReactJS to Build Native Apps

#131
post #93
post #91

Earlier quoted context omitted.

Can I create the largest possible square div in a rectangular div with this library? That is my standard test as to whether a layout framework is advanced enough to meet my basic needs. (vanilla CSS fails this test of course, even with the most recent extensions, AFAIK)

You can do that with some funny inline-block wizardy on Vanilla CSS by the way. I don’t currently know if flex-box helps here. I think not.

Source? AFAIK if you want your border, padding and margin respected, there is no way to do the above in vanilla CSS. Which is why css-flexbox was proposed.

Re: Use ReactJS to Build Native Apps

#132
post #124

I have long questioned the validity of middleware (for the lack of better terms, please don't be pedantic) to create native applications. I get it, HTML can replicate performance of native apps to a certain extent now, but it's also bound by restrictions that native apps aren't. Speed of innovation being one. HTML5 is a large ship that takes a long time to evolve (in comparison). iOS and Android aren't, by the same m…

React Native is not built on the DOM and thus is not "hybrid"--it seems it's fully native under the hood.

Re: Use ReactJS to Build Native Apps

#133
post #42

Earlier quoted context omitted.

How does it compare to AsyncDisplayKit?

According to FB it is conceptually a continuation of AsyncDisplayKit https://twitter.com/fbOpenSource/status/560512580326674432

React Native uses similar principles of AsyncDisplayKit (doing as much work as possible on a background thread and only doing what we absolutely need to on the main/UI thread) but does not depend on AsyncDisplayKit.

Re: Use ReactJS to Build Native Apps

#134

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.

Jordan, where is this conf taking place and what time (PST here). You say this is not DOM or some hybrid solution? Either this is too good to be true or ground breaking stuff. Do you mean that react could completely get rid of having to write stuff in Java or Objective-C?

http://conf.reactjs.com/

Yes, with React Native you'll be able to write native mobile apps completely in JavaScript.

Re: Use ReactJS to Build Native Apps

#135
post #91

Earlier quoted context omitted.

Can I create the largest possible square div in a rectangular div with this library? That is my standard test as to whether a layout framework is advanced enough to meet my basic needs. (vanilla CSS fails this test of course, even with the most recent extensions, AFAIK)

With css-flexbox, you probably can. Your DIV should have flex-grow: 1 which will make it take the allowable space along the "main axis" (shared with other flex-growers) and then align-items: stretch, to pick up all available space along the "cross axis". With some nesting, you can do pretty much whatever you want except for the grid layout. Grid layout is another thing coming but barely implemented in the today's bro…

Thanks, but last I looked into this it wasn't possible for this to work for a square in a parent rectangle of arbitrary dimensions. Can you find an example that works, using jsfiddle or something similar?

Re: Use ReactJS to Build Native Apps

#136
post #134

Earlier quoted context omitted.

Jordan, where is this conf taking place and what time (PST here). You say this is not DOM or some hybrid solution? Either this is too good to be true or ground breaking stuff. Do you mean that react could completely get rid of having to write stuff in Java or Objective-C?

http://conf.reactjs.com/ Yes, with React Native you'll be able to write native mobile apps completely in JavaScript.

but for iOS I need to develop it on an Apple machine correct?

Re: Use ReactJS to Build Native Apps

#137
post #98

Seasoned Appcelerator’s Titanium Mobile SDK dev here. Looks like that a lot of people here is comparing this announcement from the react team to the Titanium Mobile SDK. I’d like to give some info to shed some light on the differences, and probably anticipate the challenges they have to (or had to) solve. ## Architecture Both Titanium SDK and this Native React thing do have a JavaScript runtime behind the curtains. B…

Titanium comparisons are some of my top thoughts too.

1) How do they access the native API?

If there's no abstraction, just a translation, then the apps must be different for each platform. If there is an abstraction, then how much of the native platform do they cover? It can't be 100%, and the native APIs change with every OS version. Basic calls are easy, integrating things like device keychain, intents, and services are not so easy -- we learned this with Titanium.

2) How will React Native do cross-platform local data storage?

Being able to easily import, retain, and sync remote data is an absolute need for today's apps. Titanium uses SQLite on both sides, and has modules for more (like TiTouchDB). Not abstracting data storage would be a major mistake IMHO.

3) Can we use standard npm modules?

JS's killer feature is the module ecosystem, it's no good having a JS engine if we have to reinvent common modules to match a new API. V8 is the gold standard here, fingers crossed.

4) Debugging?

Speaks for itself. Debugging both JS and native code together bridged from a device is hard. Hopefully they are adapting existing tools and IDEs like node-inspector and Sublime Text.

Re: Use ReactJS to Build Native Apps

#138
post #134

Earlier quoted context omitted.

http://conf.reactjs.com/ Yes, with React Native you'll be able to write native mobile apps completely in JavaScript.

but for iOS I need to develop it on an Apple machine correct?

Yes, you need a Mac in order to run the simulator or build to a device.

Re: Use ReactJS to Build Native Apps

#139

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.

Will this layer be released as a separate project so that other projects like raynos/mercury [2] or elm [1] can target this interop layer? mercury was fully decoupled from virtual-dom [0] (such that you can use virtual canvas or virtual-gl). Would be really nice if this stuff can be used by other libraries easily. [0] https://github.com/Matt-Esch/virtual-dom [1] http://elm-lang.org/ [2] https://github.com/Raynos/merc…

Yes pleaseeeee tell me I can take advantage of just the View layer and use my own Model and Controller setup. With Titanium views are 'just' JS objects, so I can use Spine, Backbone, and other libraries for business and data logic.
Post reply on HN