From a5e4025256bebfe8435a46e83156fe6ff353326c Mon Sep 17 00:00:00 2001 From: Anderson Addo <34724755+andersonaddo@users.noreply.github.com> Date: Tue, 7 Jul 2020 14:31:50 -0400 Subject: [PATCH] docs(database): persistence is disabled by default (#3899) Co-authored-by: Mike Diarmid --- docs/database/offline-support.md | 4 ++-- docs/database/usage/index.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/database/offline-support.md b/docs/database/offline-support.md index 1908594e..521d25da 100644 --- a/docs/database/offline-support.md +++ b/docs/database/offline-support.md @@ -10,8 +10,8 @@ and automatically managed by the Firebase SDKs. # Enabling Persistence -Persistence is automatically enabled by default when using Realtime Database, however it -[can be disabled](/database/usage#disabling-persistence). To enable persistence, call the `setPersistenceEnabled` +Persistence is disabled by default when using Realtime Database, however it +[can be changed to be enabled by default in the firebase.json](/database/usage#enabling-persistence). You can also enable persistence programmatically, by calling the `setPersistenceEnabled` as early on in your application code as possible: ```js diff --git a/docs/database/usage/index.md b/docs/database/usage/index.md index eb7cfe55..4f694621 100644 --- a/docs/database/usage/index.md +++ b/docs/database/usage/index.md @@ -362,18 +362,18 @@ secondaryDatabase.ref(); # firebase.json -## Disabling persistence +## Enabling persistence -By default the Realtime Database persists data on the user application, and is used by the SDKs for offline usage -and caching. To disable this functionality, update the `database_persistence_enabled` key in the `firebase.json` file: +The Realtime Database can be set to persist data on the user application to be used by the SDKs for offline usage +and caching. To enable this functionality, update the `database_persistence_enabled` key in the `firebase.json` file: ```json // /firebase.json { "react-native": { - "database_persistence_enabled": false + "database_persistence_enabled": true } } ``` -To enable persistence, view the [Offline Support](/database/offline-support) documentation. +For more on persistence, view the [Offline Support](/database/offline-support) documentation.