5 ms·
Electron phone apps everywhere. That would be horrible.
by chrisper 9y ago
Electron phone apps everywhere. That would be horrible.
- ex3ndr 9y agoTo be honest React Native is Electron for mobile. On Android it starts custom Chrome engine in it.
- ashark 9y agoThat 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.
- eropple 9y agoI 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.
- amelius 9y ago> 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.
- flai 9y agoYou are aware that chrome uses V8, not the other way around?
- eropple 9y agoI 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.)
- amelius 9y agoSorry, 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.
- eropple 9y agoReact 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?
- cobar 9y agoThey 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.
- eropple 9y agoAh, TIL - I pretty much always have the Chrome debugger attached, so that's interesting. :)
- htormey 9y agoNope. 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.