Skip to content

Instantly share code, notes, and snippets.

@brunobar79
Created January 17, 2017 20:03
Show Gist options
  • Select an option

  • Save brunobar79/7e126e742ff2b60b0531ac4aeabd7da4 to your computer and use it in GitHub Desktop.

Select an option

Save brunobar79/7e126e742ff2b60b0531ac4aeabd7da4 to your computer and use it in GitHub Desktop.
ButtonPackage.java
public class ButtonPackage implements ReactPackage {
private Button mModuleInstance;
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>();
mModuleInstance = new Button(reactContext);
modules.add(mModuleInstance);
return modules;
}
@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
@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