Example usage for com.facebook.react.uimanager ThemedReactContext getJSModule

List of usage examples for com.facebook.react.uimanager ThemedReactContext getJSModule

Introduction

In this page you can find the example usage for com.facebook.react.uimanager ThemedReactContext getJSModule.

Prototype

public <T extends JavaScriptModule> T getJSModule(Class<T> jsInterface) 

Source Link

Usage

From source file:com.reactlibrary.SGScanditPicker.java

License:Apache License

@Override
public BarcodePicker createViewInstance(ThemedReactContext context) {
    // Store event dispatcher for emission of events
    eventDispatcher = context.getNativeModule(UIManagerModule.class).getEventDispatcher();

    nativeAppEventEmitter = context.getJSModule(RCTNativeAppEventEmitter.class);

    // BarcodePicker extends View
    picker = new BarcodePicker(context, scanSettings);

    // Tell picker to call our didScan method on scan
    picker.setOnScanListener(this);

    return picker;
}