Hacker News new | ask | show | jobs
by Animats 4081 days ago
So you write the business logic and layout in Javascript, but the platform's native GUI elements are used.

That's what a web browser does. Is this basically a mini-browser that looks like an "app"?

3 comments

> Is this basically a mini-browser that looks like an "app"?

React native combines native UI widgets, gaining the performance and polish that those toolkits have in delivering a polished iOS or Android look and feel.

If react native were merely a wrapper around the embedded WebUI widget, you're re-implementing these UI widgets with HTML, CSS and JS. You have the performance and web standards limitations of the platforms Web UI widget.

In a way React Native is an improvement to developer workflow, bring the speed of iterating on webapps to native mobile projects. Unlike phonegap, it avoids the semantics of the web and targets platform specific APIs and UI guidelines.

The issue with a pure HTML-based UI has more to do with the DOM. UI architectures like React get a lot of mileage from asynchronous models.

However, the HTML DOM does not have the most flexible API. The API itself is structured around document manipulation. It's synchronous, and puts some limitations on how you structure UI changes. This is one of the reasons React did the whole shadow-DOM thing.

React Native essentially lets the React devs build a UI API that fits directly with their framework. It's something we can learn from and use to modify DOM APIs to serve as better UI abstractions.

> Is this basically a mini-browser that looks like an "app"?

No? I don't understand why you're abstractly positing something that a web browser does so that you can compare this to a browser.

Browsers also display text & images, is UIKit a web browser? No, it isn't.