Skip to content

Commit

Permalink
docs(database): how to reference non-us-central-1 real-time databases (
Browse files Browse the repository at this point in the history
…invertase#5810)

* docs(database): referencing real-time database
* fix: documentation grammar
  • Loading branch information
alarm109 authored Oct 24, 2021
1 parent 9f00ac9 commit 89b104a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/database/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ import database from '@react-native-firebase/database';
const reference = database().ref('/users/123');
```

NOTE: To get a reference to a database other than an 'us-central1' default database, you must pass the database URL. You can find your Realtime Database URL in the Realtime Database section of the Firebase console.

```js
import { firebase } from '@react-native-firebase/database';

const database = firebase
.app()
.database('https://<databaseName>.<region>.firebasedatabase.app/')
.ref('/users/123');
```

## Reading data

The Realtime Data provides the ability to read the value of a reference as a one-time read, or realtime changes to the node.
Expand Down

0 comments on commit 89b104a

Please sign in to comment.