3 ms·
How is RN "native", I mean apart of its naming? AFAIK, RN is bundled with a browser runtime, isn't it?
by tannhaeuser 7y ago
How is RN "native", I mean apart of its naming? AFAIK, RN is bundled with a browser runtime, isn't it?
- lucideer 7y agoNo, RN isn't bundled with any browser runtime. You're possibly thinking of Apache Cordova (which leverages the device's browser runtime for rendering UI). RN is Javascript so it will execute on the device's JS runtime, which I guess is connected to the browser in some way, but RN doesn't use the browser for UI. The rendering is true native UI. The way React does this is by decoupling the core library from UI rendering. The core React library contains no UI rendering code, it just handles UI lifecycles, internal state, events, etc. for logical UI components as object instances. You then plug that into a renderer library (most commonly the "ReactDOM" lib for web browser rendering).
- s_y_n_t_a_x 7y ago> so it will execute on the device's JS runtime Close. RN uses JavaScriptCore (Safari's JS VM). On iOS it will use the system provided VM. On Android, it's bundled with the app. Hermes (https://hermesengine.dev/ https://hermesengine.dev/) is the new Android JS VM optimized for boot time and memory usage.