mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
[docs][core] default app additions
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
<!-- TODO -->
|
||||
### 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user