News for hackers. Stuff that matters.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by chrisper on Wednesday May 24, 2017 @11:29AM (#14410716)
Electron phone apps everywhere. That would be horrible.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by ex3ndr on Wednesday May 24, 2017 @11:56AM (#14410949)
To be honest React Native is Electron for mobile. On Android it starts custom Chrome engine in it.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by eropple on Wednesday May 24, 2017 @12:05PM (#14411037)
I don't believe that this is accurate. It starts a V8 engine, not a Chrome engine, and renders (on the standard framework UI loop) using--as one would expect--native controls.

If you want to use a WebView, you must invoke a WebView.

Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by cobar on Wednesday May 24, 2017 @12:51PM (#14411424)
They actually ported JavascriptCore over to Android. The only time it uses V8 is if you run the code through the Chrome Debugger. Not sure what the benefit was perhaps performance or lower disk usage.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by eropple on Wednesday May 24, 2017 @01:02PM (#14411513)
Ah, TIL - I pretty much always have the Chrome debugger attached, so that's interesting. :)
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by amelius on Wednesday May 24, 2017 @12:39PM (#14411305)
> It starts a V8 engine, not a Chrome engine

And that V8 engine contains functionality which is surprisingly similar to Chrome.

Except they decided to reinvent the wheel.

Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by eropple on Wednesday May 24, 2017 @01:03PM (#14411531)
I don't know if you're aware, but Chrome uses V8 to provide that functionality. Perhaps this is a Chesterton's Fence situation you should think about a bit?

(Though, as the sibling comment notes, it uses JavaScriptCore, which is Webkit's JavaScript engine, not V8 at all.)

Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by amelius on Wednesday May 24, 2017 @04:05PM (#14413014)
Sorry, I'm fully aware of what V8 is (I actually embedded V8 once myself). By "V8 engine", I meant an engine containing V8, among other things such as a renderer. Bad wording, my mistake.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by eropple on Wednesday May 24, 2017 @04:38PM (#14413259)
React Native doesn't contain a renderer in the Chrome-y sense of the term, to the best of my knowledge. It wraps native APIs instead. Am I missing something?
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by amelius on Thursday May 25, 2017 @06:41AM (#14416454)
Well, eventually Chrome also calls native APIs to perform the rendering.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by eropple on Thursday May 25, 2017 @12:50PM (#14418457)
You're stretching. Chrome calls native APIs to render a rasterized view. React Native calls native APIs to render native widgets in a native window, i.e. an Android activity.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by flai on Wednesday May 24, 2017 @12:50PM (#14411421)
You are aware that chrome uses V8, not the other way around?
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by ashark on Wednesday May 24, 2017 @12:00PM (#14410989)
That might explain how they got around the horror that is trying have have complex, flexible styling across several major Android versions without every single thing you do being entirely broken on one or another. I'd wondered why the various things I'd tried kept actually working. That'd do it.
Re:If It Weren’t for Apple, Hybrid App Development Would Be ... by htormey on Wednesday May 24, 2017 @03:03PM (#14412568)
Nope. React native doesn't use webviews to render its ui. Business logic and view configuration are in JavaScript but all rendering and event processing is done in native. Also it's easy to wrap native components and insert them, something you just can't do in a webview.