Skip to content

Instantly share code, notes, and snippets.

@Kudo
Created November 5, 2018 16:20
Show Gist options
  • Save Kudo/f445e26cc4697d47662257aed98ff8b3 to your computer and use it in GitHub Desktop.
Save Kudo/f445e26cc4697d47662257aed98ff8b3 to your computer and use it in GitHub Desktop.
extern "C" HelloCxxModule* createHelloCxxModule() {
return new HelloCxxModule();
}
public final class HelloCxxPackage implements ReactPackage {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
return Arrays.<NativeModule>asList(
// I have librnpackage-hellocxx.so the exported createHelloCxxModule() above.
CxxModuleWrapper.makeDso("rnpackage-hellocxx", "createHelloCxxModule")
);
}
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment