From a0072745198b1854175b6557caa88993dfb69444 Mon Sep 17 00:00:00 2001 From: Salakar Date: Thu, 5 Oct 2017 03:03:49 +0100 Subject: [PATCH] [docs][core] default app additions --- docs/core/config-default-app.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/core/config-default-app.md b/docs/core/config-default-app.md index 40a0ed6a..cfb2ba64 100644 --- a/docs/core/config-default-app.md +++ b/docs/core/config-default-app.md @@ -1,4 +1,16 @@ - +### Default Firebase App + +After following the iOS & Android install guides and correctly setting up your google services plist/json files; the default app is automatically initialized and available for use in react-native-firebase. + +There's no need to call `initializeApp(opt)` in your JS code for the default app, import RNFirebase and use the default app straight away: + +```javascript +import firebase from 'react-native-firebase'; + +console.log(firebase.database().app.name); // '[DEFAULT]' +``` + +!> Calling `initializeApp()` for the default app will throw an 'app already initialized' error in a later release. ### Enable Database Persistence