How to use the @react-native-firebase/app/lib/internal.getFirebaseRoot function in @react-native-firebase/app

To help you get started, we’ve selected a few @react-native-firebase/app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github invertase / react-native-firebase / packages / ml-natural-language / lib / index.js View on Github external
// mlkit().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: false,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseMlkitModule,
});

// import mlkit, { firebase } from '@react-native-firebase/mlkit';
// mlkit().X(...);
// firebase.mlkit().X(...);
export const firebase = getFirebaseRoot();
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
// mlkit().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: false,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseMlkitModule,
});

// import mlkit, { firebase } from '@react-native-firebase/mlkit';
// mlkit().X(...);
// firebase.mlkit().X(...);
export const firebase = getFirebaseRoot();
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
// vision().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: true,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseMlKitVisionModule,
});

// import vision, { firebase } from '@react-native-firebase/ml-vision';
// vision().X(...);
// firebase.vision().X(...);
export const firebase = getFirebaseRoot();

// e.g.
// // import { VisionCloudTextRecognizerModelType } from '@react-native-firebase/ml-vision';
export VisionBarcodeFormat from './VisionBarcodeFormat';
export VisionFaceContourType from './VisionFaceContourType';
export VisionFaceLandmarkType from './VisionFaceLandmarkType';
export VisionBarcodeValueType from './VisionBarcodeValueType';
export VisionBarcodeEmailType from './VisionBarcodeEmailType';
export VisionBarcodePhoneType from './VisionBarcodePhoneType';
export VisionBarcodeAddressType from './VisionBarcodeAddressType';
export VisionFaceDetectorContourMode from './VisionFaceDetectorContourMode';
export VisionFaceDetectorLandmarkMode from './VisionFaceDetectorLandmarkMode';
export VisionBarcodeWifiEncryptionType from './VisionBarcodeWifiEncryptionType';
export VisionFaceDetectorPerformanceMode from './VisionFaceDetectorPerformanceMode';
export VisionCloudTextRecognizerModelType from './VisionCloudTextRecognizerModelType';
export VisionFaceDetectorClassificationMode from './VisionFaceDetectorClassificationMode';
github invertase / react-native-firebase / packages / dynamic-links / lib / index.js View on Github external
// links().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeEvents,
  nativeModuleName,
  hasMultiAppSupport: false,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseLinksModule,
});

// import links, { firebase } from '@react-native-firebase/dynamic-links';
// links().X(...);
// firebase.links().X(...);
export const firebase = getFirebaseRoot();
github invertase / react-native-firebase / packages / indexing / lib / index.js View on Github external
// indexing().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: false,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseIndexingModule,
});

// import indexing, { firebase } from '@react-native-firebase/indexing';
// indexing().X(...);
// firebase.indexing().X(...);
export const firebase = getFirebaseRoot();
github invertase / react-native-firebase / packages / crashlytics / lib / index.js View on Github external
// crashlytics().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: false,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseCrashlyticsModule,
});

// import crashlytics, { firebase } from '@react-native-firebase/crashlytics';
// crashlytics().X(...);
// firebase.crashlytics().X(...);
export const firebase = getFirebaseRoot();
firebase.crashlytics();
github invertase / react-native-firebase / packages / firestore / lib / index.js View on Github external
// firestore().X(...);
export default createModuleNamespace({
  statics: FirestoreStatics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents,
  hasMultiAppSupport: true,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseFirestoreModule,
});

// import firestore, { firebase } from '@react-native-firebase/firestore';
// firestore().X(...);
// firebase.firestore().X(...);
export const firebase = getFirebaseRoot();
github invertase / react-native-firebase / packages / ml-natural-language / lib / index.js View on Github external
// naturalLanguage().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: true,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseMlKitLanguageModule,
});

// import naturalLanguage, { firebase } from '@react-native-firebase/mlkit';
// naturalLanguage().X(...);
// firebase.naturalLanguage().X(...);
export const firebase = getFirebaseRoot();

// TODO not available on Firebase iOS until SDK 6.0.0, add in RNFB >6.1
// --------------------------
//     LANGUAGE_TRANSLATE
// --------------------------
// translate(text, translationOptions) {
//   const _translationOptions = {};
//
//   // retrieve the language id integers
//   const { sourceLanguage, targetLanguage } = translationOptions;
//   _translationOptions.sourceLanguage = this.native.TRANSLATE_LANGUAGES[sourceLanguage];
//   _translationOptions.targetLanguage = this.native.TRANSLATE_LANGUAGES[targetLanguage];
//   // translationOptions required:
//   //    sourceLanguage
//   //    targetLanguage
//   return this.native.translate(text, _translationOptions);
github invertase / react-native-firebase / packages / remote-config / lib / index.js View on Github external
// config().X(...);
export default createModuleNamespace({
  statics,
  version,
  namespace,
  nativeModuleName,
  nativeEvents: false,
  hasMultiAppSupport: false,
  hasCustomUrlOrRegionSupport: false,
  ModuleClass: FirebaseConfigModule,
});

// import config, { firebase } from '@react-native-firebase/remote-config';
// config().X(...);
// firebase.remoteConfig().X(...);
export const firebase = getFirebaseRoot();
github invertase / react-native-firebase / packages / admob / lib / ads / RewardedAd.js View on Github external
static createForAdRequest(adUnitId, requestOptions) {
    if (!isString(adUnitId)) {
      throw new Error(
        `firebase.admob() RewardedAd.createForAdRequest(*) 'adUnitId' expected an string value.`,
      );
    }

    let options = {};
    try {
      options = validateAdRequestOptions(requestOptions);
    } catch (e) {
      throw new Error(`firebase.admob() RewardedAd.createForAdRequest(_, *) ${e.message}.`);
    }

    const requestId = _rewardedRequest++;
    const admob = getFirebaseRoot().admob();
    return new RewardedAd('rewarded', admob, requestId, adUnitId, options);
  }

@react-native-firebase/app

A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto

Apache-2.0
Latest version published 1 day ago

Package Health Score

98 / 100
Full package analysis