'Initialize react-native-firebase with web firebase configuration

is it possible to install react-native-firebase without touching the native code and use the js config of firebase to initialize react-native-firebase?

I think of something like this:

import * as firebase from 'firebase'
import RNfirebase from 'react-native-firebase'
// Initialize Firebase
var config = {
  apiKey: "someApiKey",
  authDomain: "some.auth.domain",
  databaseURL: "dbUrl",
  projectId: "myProjectId",
  storageBucket: "storage",
  messagingSenderId: "8734652304"
}
const myFirebase = firebase.initializeApp(config)
const myRNFirebaseRef = RNfirebase.initializeRNApp(myFirebase)

Or do i have to install it on the specific native platform?

In the documentation is a point to install/(use) it in 'web style'. But there is no description about how to use the 'main firebase configuration'.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source