Skip to content

Latest commit

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

#react-native-BGNativeModuleExample

下面两篇博客的示例代码:

ReactNative之原生模块开发并发布——iOS篇

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

About

A native module example

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages