PouchDB Investigation - 509dave16/react-native-prototypes GitHub Wiki

Summary

PouchDB, you're our only hope for cross Web/Desktop/Mobile apps written in Javascript that have offline support, sync, and provide a database client interface with relational schemas. We can take advantage of any number of plugins and adapters to make this work well on all platforms. The following are some packages we should consider using:

Refer to the following Github issue for finding out how to use PouchDB in different environments/runtimes: https://github.com/pouchdb/pouchdb/issues/6367

In terms of our hope being in PouchDB, the following actions will and probably should be followed across all platforms:

  1. Always retrieve offline storage of PouchDB app data and then have it synced with the server if there is online connectivity
  2. Always persist PouchDB app data to offline storage when app is exiting or crashes.

Things to Investigate

  1. Persistence to Offline Storage
  • Web: local storage
  • Desktop: local storage(most likely unless electron uses something else)
  • Mobile: async storage(unfortunately :( )