react-native-cmmc

0.0.6 • Public • Published

React Native CMMC

Installation

npm install react-native-cmmc --save

Installation (iOS)

not now

Installation (Android)

...
include ':react-native-cmmc'
project(':react-native-cmmc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cmmc/android')
  • In android/app/build.gradle
...
dependencies {
    ...
    compile project(':react-native-cmmc')
}
  • register module (in MainActivity.java)
import v5.cmmc.*;  // <--- import 
 
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
  ......
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mReactRootView = new ReactRootView(this);
 
    mReactInstanceManager = ReactInstanceManager.builder()
      .setApplication(getApplication())
      .setBundleAssetName("index.android.bundle")
      .setJSMainModuleName("index.android")
      .addPackage(new MainReactPackage())
      .addPackage(new RTCCMMCPackage())              // <------ add here 
      .setUseDeveloperSupport(BuildConfig.DEBUG)
      .setInitialLifecycleState(LifecycleState.RESUMED)
      .build();
 
    mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null);
 
    setContentView(mReactRootView);
  }
 
  ......
}

Screencasts

Usage

Example

var React = require('react-native');
var {
    StyleSheet,
    View,
    Image
} = React;
 

Package Sidebar

Install

npm i react-native-cmmc

Weekly Downloads

1

Version

0.0.6

License

MIT

Last publish

Collaborators

  • nazt