You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not uncommon to use multiple DB. Often the local db and the remote db.
It would be a good idea to have access to multiple DBs contexts with usePouchDB.
Desired Behavior
Every hook should have an additional optional option to specify the db to use. If this option is omitted, then the closest DB in the component-tree should be used (the default).
Possible Solution
The context Provider should check if there is already an context. And if it exists, then include all its DBs into its context, and overwrite the default one.
The DBs can then be selected using their names.
Additional context
This would allow many new use-cases:
Have a local db and a remote db. The local is used the most. But the remote can be accessed by the log-in-component.
Start with using a remote db. Once the local db did sync and all views are indexed, switch to the local db.
Use a temporary db (in memory only). To check out the app. And once the user signs up, then create a local and remote db and sync the temp to them.
The text was updated successfully, but these errors were encountered:
Summary
It is not uncommon to use multiple DB. Often the local db and the remote db.
It would be a good idea to have access to multiple DBs contexts with usePouchDB.
Desired Behavior
Every hook should have an additional optional option to specify the db to use. If this option is omitted, then the closest DB in the component-tree should be used (the default).
Possible Solution
The context Provider should check if there is already an context. And if it exists, then include all its DBs into its context, and overwrite the default one.
The DBs can then be selected using their names.
Additional context
This would allow many new use-cases:
The text was updated successfully, but these errors were encountered: