I mean he admits he had to build a bunch of products before he understood the concept, but didn't waste a single slide to explain it in the presentation.
Introducing React Native [video]
171–180 of 193 posts
Re: Introducing React Native [video]
#172Earlier quoted context omitted.
> when I first saw the React syntax Do you mean JSX? Because "the React syntax" is just plain JS unless you're using JSX, is it not? IIRC even vdom nodes can be created by hand with literal objects.
Yeah, JSX. Whoops!
becomes (more or less) Component1(
{attr1: "value", attr2: foo},
Component2(),
Component3()
);Re: Introducing React Native [video]
#173Can anyone please explain what a "declarative API" is, and why that is better than an imperative? He claims this is the best part of the framework, but I'm just left with a big "what?" since I don't understand what the hell that sentence means. I mean he admits he had to build a bunch of products before he understood the concept, but didn't waste a single slide to explain it in the presentation.
The typical example for this is SQL - you don't tell an SQL database how to run a query, you tell it what you want, and it figures it out.
In Reacts case, you describe your application in terms of components that know how to render themselves given different sets of data, or states. When the application state changes, the entire application is re-rendered. The "magic" of React is that the use of a virtual dom to create an efficient diff from the current dom state to the new dom state allows this to be very performant, ensuring a minimum of actual dom changes are made.
The resulting components are much, much easier to reason about. You can see, looking at the code, exactly how the component will behave given different data. In essence, what you see is what you get. This is a far better dev experience than working with components that can be mutated by events; you need to build a mental model of all the various states that the component could find itself in.
I was driven to this approach using Backbone to tame a particularly complex interface, similar in complexity to the ads example shown in the video. But as mentioned, doing this naively (in this case, re-rendering a backbone template instead of mutating it), leads to all kinds of user interface glitches. React smooths over those glitches.
Re: Introducing React Native [video]
#174Earlier quoted context omitted.
Similar in this sense: 1) it uses templating (in our case, HTML, Android XML, and XIB) 2) it is cross platform, runs everywhere, even server 3) it produces native apps It's different in this sense: 1) it doesn't do DOM diffing, it does two-way data-binding 2) it's statically compiled to native code, it doesn't try to run JS in native platforms, and doesn't require any async seems between between the native platform (…
The core engineers behind J2ObjC were those who built Swing at Sun. We're pretty sour on the idea that write-once run-anywhere UIs are possible That's an odd conclusion. They're clearly possible, perhaps you mean they don't provide some notion of excellent UI. But even then, web apps are rather a big counter-example ... web apps have never looked native, never been consistent with each other, they don't even try, yet…
The point about Swing is that, it's good, so long as we're talking about custom LAF, not the Windows/Motif/OSX PLAF, which look/act sort of like the OS UX, but not quite.
Re: Introducing React Native [video]
#175We just demoed something similar at the GWTCreate conference, an Angular-like library called Singular ( http://daniel-kurka.de/talks/gwtcreate15/singular.pdf ) It differs in that it uses the same techniques as Google Inbox to run native code. We cross compile to Objective-C with j2objc, and cross-compile to JS via GWT, the data binding, controllers, are shared code on all platforms that run full speed native, while t…
> We cross compile to Objective-C with j2objc, and cross-compile to JS via GWT, the data binding, controllers, are shared code on all platforms that run full speed native, while the UI templating language on each platform is platform native (e.g. angular directives directly in Android XML files) Honestly, this sounds like quite a technical achievement, but... WHY? WHY? Why... are we still forced to go through these e…
Eventually mobile performance, and API surface area will increase to the point where they're "good enough". Then they'll be an inflection point where people write Web apps for cross platform-ness for all but the most demanding stuff (like games or video editing)
Re: Introducing React Native [video]
#176Earlier quoted context omitted.
Yep, you've got the gist of it. We render the app in JS, React creates this view hierarchy (still in JS), this is serialized and sent over the bridge (asynchronously) to the native engine who then creates the equivalent native view hierarchy and renders it. The source code for the iOS native engine (and the JS infra, and some examples) will be given to attendees of React.js Conf tomorrow (Jan 29). The iOS and Android…
Is this native engine still html based (eg blink engine or webkit) or is it using the platforms drawing engines? We are currently building user interfaces for STB platforms using a a js platform mapped to a native canvas running on v8. If we could use the react protocol it would be great.
Re: Introducing React Native [video]
#177Earlier quoted context omitted.
> We cross compile to Objective-C with j2objc, and cross-compile to JS via GWT, the data binding, controllers, are shared code on all platforms that run full speed native, while the UI templating language on each platform is platform native (e.g. angular directives directly in Android XML files) Honestly, this sounds like quite a technical achievement, but... WHY? WHY? Why... are we still forced to go through these e…
Long term, I want the Web to win. Eventually I think it will. In the 90s, no one ever thought apps like Gmail, Docs, or Maps could exist in the browser, and now no one questions that an Office suite can be done. Eventually mobile performance, and API surface area will increase to the point where they're "good enough". Then they'll be an inflection point where people write Web apps for cross platform-ness for all but…
https://www.youtube.com/watch?v=UEIHfXLMtwA
I realize it's only-O'Caml at the moment, but I think this is mostly the kind of thing we're all striving for?(IOW: I want you, personnaly, to work for this objective :))
Re: Introducing React Native [video]
#178Looks like React is reaching critical mass.
Based on what metric? A Facebook team talking about a Facebook framework and a HN thread filled with React enthusiasts? I am not bashing any of it, but to suggest critical mass is a bit immature.
Re: Introducing React Native [video]
#179What is the defacto best way to learn React? I like the architecture and the coding style, but there doesn't seem to be a lot of talk about best practices.