Skip to content

pencilCool/react-native-BGNativeModuleExample

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 39.1%
  • Java 32.0%
  • JavaScript 20.5%
  • Python 8.4%