React于React native的渲染机制

面向virtual DOM编程 vs 面向native componet编程;

 

状态编程引起的UI变化会全部提交到native compnent然后走平台原来的渲染流程。

 

The DOM is just one of the rendering environments React can render to,

the other major targets being native iOS and Android views via React Native. (This is why "virtual DOM" is a bit of a misnomer.)

 

ReactJS outputs the DOM that can be rendered the browsers. As you already know, the virtual DOM helps ReactJS efficiently keeps track of the delta of what has changed. For React Native for iOS, ultimately it outputs UIKit code. Same thing with React Native for Android, but instead of outputting DOM or UI Kit, the output is created using Android SDKs. So virtual DOM is just an intermediate step.

 

https://stackoverflow.com/questions/41804855/does-react-native-have-a-virtual-dom

posted @ 2019-07-05 18:44  zzfx  阅读(700)  评论(0编辑  收藏  举报