registerApp

void registerApp(

  1. String appName,
  2. JSFunction component
)

Register the main app component

Implementation

void registerApp(String appName, JSFunction component) {
  _rnCoreLog('=== registerApp() called with appName: $appName ==='.toJS);
  _rnCoreLog('=== Getting appRegistry ==='.toJS);
  final registry = appRegistry;
  _rnCoreLog('=== Got appRegistry ==='.toJS);
  _rnCoreLog('=== Creating provider function ==='.toJS);
  final provider = (() => component).toJS;
  _rnCoreLog('=== Calling registerComponent ==='.toJS);
  registry.callMethod('registerComponent'.toJS, appName.toJS, provider);
  _rnCoreLog('=== registerComponent called successfully ==='.toJS);
}