-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withStorageSync support for INDEXEDDB #111
Comments
You can add a PR. If you are quick, it might land in the 19 release (which is overdue) |
thanks @rainerhahnekamp , is there any 3rd party tool which can provide storage persistence with indexeddb? Please let me know, thanks :) |
@audhit I only know https://dexie.org/ |
@rainerhahnekamp do we now have the support for indexedDB storage instead of localStorage/sessionStorage in the latest version v19.0.2 or it is still under development? Please let us know, thanks in advance for the great library...keep rocking 🚀 |
Not yet, but nobody prevents us from adding it. I was waiting for further input from the community about the recommended tooling. I don't have a problem with dexie but would know if it is still the library to use. |
https://dexie.org/ looks really good, is it possible to create a wrapper out of dexie and connect it with storageSync API just like below to make it as simple as possible, hoping for the best
|
Would @audhit like to add a PR? |
@audhit or @mzkmnk or both: You can give it a try. The only design requirement that I have, is that it needs to be treeshakable. We only want to have dexie as requirement if the user wants to use it. Therefore:
|
I read through the docs of Dexie and IndexedDB. For simple state synchronisation, I think Dexie is an overkill since it allows more database-related functionality. We actually just want to persist the data and don't run specific queries. So instead of What do you think? |
@rainerhahnekamp import { IndexedDB, withStorageSync } from '@angular-architects/ngrx-toolkit';
...
withStorageSync({
key: 'todos',
storage: () => IndexedDB,
}), appendix appendix2 : ) |
Hey guys, sorry I was away for some time. Looks like @mzkmnk is already working on it here - #129 . Looking forward to it. @rainerhahnekamp please let me know when it is available and which version to install of ngrx-toolkit in order to get it in my project. Really superb work and wonderful toolkit and community. You guys are really helping me out here. Thanks a lot. Cheers :) |
withStorageSync is working and a cool feature, thanks a lot for it, but I would love to see the support for indexeddb as well because it has more storage limitation compare to 5 MB of localstorage. Please let me know, how can I achieve it. I really want the storage to be indexeddb instead of localstorage or sessionstorage. Thanks in advance.
The text was updated successfully, but these errors were encountered: