react-native-nativemodule-example-duang
v1.0.0
Published
下面两篇博客的示例代码:
Downloads
3
Readme
#react-native-BGNativeModuleExample
下面两篇博客的示例代码:
ReactNative之原生模块开发并发布——android篇
##安装
rnpm install react-native-nativemodule-example
##集成
reactNative0.29版本以后,需要在MainApplication.java
文件的getPackages
方法中添加:
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new BGNativeExamplePackage()
);
}
##使用
import BGNativeModuleExample from 'react-native-nativemodule-example';
BGNativeModuleExample.testPrint("Jack", {
height: '1.78m',
weight: '7kg'
});
##Example
npm install