0

I have a requirement in a react project to use firebase real-time db and sometimes this may be during low or no connectivity.

I know that Firestore has a native offline capability but just wondering how could I make firebase db work offline.

The requirements have quite a heavy R/W workload, so I'm trying to avoid Firestore in this instance.

Should I use something like indexeddb? Has anyone had anything similar? And regarding client side rest data encryption would you recommend something?

Many thanks

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Angelo Mermiklis
  • 317
  • 1
  • 3
  • 4

1 Answers1

0

There is no built-in support for persisting data between reloads in the Firebase Realtime Database SDK for JavaScript/web. It does handle intermittent loss of connectivity, as long as the user doesn't reload the page.

If you want to persist data between page reloads, you will indeed have to implement that yourself - for example by storing the snapshot values in indexeddb.

Also see:

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807