本机组件在运行时作为视图、ViewGroup或Fragments的行为如何



在React native中,我们将组件创建为:-

export default class MyComponent extends Component {
render() {
return (
<View >
</View> 
)
}
}

并制作Android版本,但当它在Android操作系统上运行时组件将转换为哪个android组件(fragment,View或ViewGroup(。

基本上在android中调用单个活动(MainActivity(和在它内部,一个单独的视图ReactRootView呈现了类似碎片的东西在活动中渲染。所有React原生组件在单个组件内渲染ReactRootView。

了解更多详细信息:-https://facebook.github.io/react-native/docs/integration-with-existing-apps

最新更新