原生UI组件

来源:互联网 发布:大华网络监控软件 编辑:程序博客网 时间:2024/06/05 23:50

一些坑

##源码 ##
function requireNativeComponent(  viewName: string,  componentInterface?: ?ComponentInterface,  extraConfig?: ?{nativeOnly?: Object},): ReactClass<any> | string {...}
requireNativeComponent方法通过UIManager[ViewName]来进行native组件的查找 ,但native原生代码中export的类名为RCTMapManager ,而js端进行查找的方法为
module.exports = requireNativeComponent('RNTMap', null)

这里的RNTMap是根据什么确定的?

UIManager的一些知识

React-Native 渲染实现分析

原创粉丝点击