Live data from Hacker News

Introducing React Native [video]

youtube.com

61–70 of 193 posts

Re: Introducing React Native [video]

#62
post #45

I wish they'd go into more detail on why they can't make an app like paper in the browser environment. They mentioned something about Web Workers being crippled and later on explained how their framework puts JavaScript in it's own thread by default. I'm also wondering why in their experience no one ever comes close to native widgets when imitating them in a Web apps.

Indeed. If I look at Slack which I believe is actually a wrapped HTML5 on iOS + Android it looks already very good. But it doesn't have a lot of gestures+animations+images, so that might be the difference.

I don't think Slack is a HTML5 app, at least on Android. The apk contains ~2.5MB of bytecode and half a meg of layouts.

Re: Introducing React Native [video]

#63
post #37

Just a minor quibble; I think the speaker is a bit too negative about faux-native apps, especially with React. For example, see this demo by Pete Hunt: https://medium.com/@floydophone/building-a-real-time-frosted...

You're not the only person to give me that feedback. :) Check out my other reply as well.

I agree it's possible to make things that feel good, it's just very, very hard, and it's certainly not the default.

Re: Introducing React Native [video]

#64
post #37

Just a minor quibble; I think the speaker is a bit too negative about faux-native apps, especially with React. For example, see this demo by Pete Hunt: https://medium.com/@floydophone/building-a-real-time-frosted...

If you look at the demo you'll see that while it's likely close to the best you can do with web tech, the physics don't feel correct because we can't reuse the native constants. Also the UI is very flat and simple. More complex UIs would be a struggle without react native.

Re: Introducing React Native [video]

#65
I understood that the native react serializes the ui "DOM" to some format and sends it to the native process. Will the native rendering engine be open source and/or will the protocol be open/specified ? This could be handy for embedded targets.

Re: Introducing React Native [video]

#66

Earlier quoted context omitted.

with gpu-accelerated css transitions, requestAnimationFrame, virtual dom and web workers, the experience can be damn close. he makes it seem like "no comparison", this is provably false at least for the apps he demoed. for games, native is still necessary. what react offers beyond performance though, is definitely awesome. imo, the talk comes off a bit like a sales pitch at a pep rally.

You're absolutely right that it is possible to get close. I think my main point here, (though I probably didn't cover this well enough and I was being somewhat hyperbolic, I guess), was that 'damn close' is unfortunately not the default on web, and it's actually really, really hard to get there. Sorry for coming across as a sales person. Someone tweeted about a previous presentation of mine in the past asking "who th…

I thought the talk had a nice balance of pitching the idea of native React and the technical ideas behind it.

Re: Introducing React Native [video]

#67
post #62
post #45

Earlier quoted context omitted.

Indeed. If I look at Slack which I believe is actually a wrapped HTML5 on iOS + Android it looks already very good. But it doesn't have a lot of gestures+animations+images, so that might be the difference.

I don't think Slack is a HTML5 app, at least on Android. The apk contains ~2.5MB of bytecode and half a meg of layouts.

[deleted]

Re: Introducing React Native [video]

#68
post #62
post #45

Earlier quoted context omitted.

Indeed. If I look at Slack which I believe is actually a wrapped HTML5 on iOS + Android it looks already very good. But it doesn't have a lot of gestures+animations+images, so that might be the difference.

I don't think Slack is a HTML5 app, at least on Android. The apk contains ~2.5MB of bytecode and half a meg of layouts.

Wow. Indeed. thanks! I really thought that they were HTML5 based on how similar the HTML5 version is compared to the Android experience. Thanks again!

Re: Introducing React Native [video]

#69
post #35

Earlier quoted context omitted.

React, as the developers argue, is a step beyond data binding. It emphasises immutability and a single data flow, rather than the combinatorial interdependency of the data binding approach.

One way data binding is supported by WPF also, I mean, two-way data binding is the unusual odd man out. And of course, the one way data flow functions have to be immutable and you have to take a dependency whenever when you read a property imperatively. What they've done with react native sounds a lot like how WPF works anyways (scene graph updated in UI thread, rendering thread then renders scene graph). Now, there…

Having worked on production software with both WPF and React, I can tell you why React's "data binding" approach is categorically different (better, in my opinion) than WPF's.

Like many abstractions in WPF, bindings have a "shadow world" feeling, where they are their own little isolated DSL. With the React model, "bindings" are just JavaScript expressions. Sure, with WPF you can overload operators and create "ExpressionBinding" converters and play other tricks, but you can feel the seams between the subsystems.

On the topic of the scene graph: React's scene graph is an abstract service that you can only interact with in limited ways. WPF's scene graph is a big mutable machine with most of its moving bits exposed. To a first approximation, React's rendering strategy is laziness and WPF's rendering strategy is fixed point iteration. The former is much more likely to produce easy to understand and high performing UIs, even if it comes at the cost of making a few special use cases harder. In such cases, you can bypass the abstraction and muck with the platform guts, which seems to be the default choices in the dependency properties context.

Re: Introducing React Native [video]

#70
post #39

That's it. I'm finally going to port GridBagLayout to Javascript.

The memories of GridBagLayout still haunt me to this day (see username). This is a classic gridbag cartoon: http://madbean.com/anim/totallygridbag

Heh, I remember coding a vertical FlowLayout in 1999 (before that was included) out of fear and loathing of GridBagLayout...
Post reply on HN