How to use the react-native-firebase.initializeApp function in react-native-firebase

To help you get started, we’ve selected a few react-native-firebase 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 prescottprue / react-redux-firebase / examples / complete / react-native-firebase / src / createStore.js View on Github external
export default (initialState = { firebase: {} }) => {
  // initialize firebase
  const firebase = RNFirebase.initializeApp(reactNativeFirebaseConfig)

  const store = createStore(
    makeRootReducer(),
    initialState, // initial state
    compose(
      reactReduxFirebase(firebase, reduxFirebaseConfig) // pass initialized react-native-firebase app instance
    )
  )
  return store
}
github AOSSIE-Org / CarbonFootprint-Mobile / __tests__ / setup / setupFirebase.js View on Github external
export function initFirebase() {
    let FirebaseServer = require('firebase-server');
    new FirebaseServer(5000, 'localhost', {});
    firebase.initializeApp(firebaseConfigForTesting);
}
github AOSSIE-Org / CarbonFootprint-Mobile / app / actions / firebase / Init.js View on Github external
return new Promise(function(resolve, reject) {
        if (!firebase.apps.length) {
            firebase.initializeApp(firebaseConfig);
        }
        const serverTime = firebase.database().getServerTime();
        console.log(serverTime, 'ServerTime');
        firebase.auth().onAuthStateChanged(function(user) {
            if (user) {
                user = user.toJSON();
                getUser(user.email)
                    .then(user => resolve(user))
                    .catch(error => reject());
            } else {
                reject();
            }
        });
    });
}
github react-chunky / react-native-chunky / index.js View on Github external
import React from 'react'
import { Core } from 'react-chunky'
import { AppRegistry, AsyncStorage, Text } from 'react-native'
import RNFirebase from 'react-native-firebase'

import * as Styles from './src/styles'
import * as Errors from './src/errors'
import * as Utils from './src/utils'
import * as Components from './src/components'
import Screen from './src/core/Screen'
import ListScreen from './src/core/ListScreen'
import App from './src/core/App'

global.storage = AsyncStorage
global.firebase = RNFirebase.initializeApp({
  debug: true
})

export function renderApp(props) {
  const main = () => (
    
  )

  AppRegistry.registerComponent(props.id, () => main)
}

export { Styles, Errors, Screen, ListScreen, App, Components, Utils }