Skip to content

Commit 89b104a

Browse files
authored
docs(database): how to reference non-us-central-1 real-time databases (#5810)
* docs(database): referencing real-time database * fix: documentation grammar
1 parent 9f00ac9 commit 89b104a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/database/usage/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ import database from '@react-native-firebase/database';
5050
const reference = database().ref('/users/123');
5151
```
5252

53+
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.
54+
55+
```js
56+
import { firebase } from '@react-native-firebase/database';
57+
58+
const database = firebase
59+
.app()
60+
.database('https://<databaseName>.<region>.firebasedatabase.app/')
61+
.ref('/users/123');
62+
```
63+
5364
## Reading data
5465

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

0 commit comments

Comments
 (0)