-
Notifications
You must be signed in to change notification settings - Fork 76
How to get all stored key-values #70
Comments
You can store with a fixed, known key a list of your keys of interest, or a JSON representation of a complex object containing all your data (instead of loose individual items with various keys). In both cases no particular library support is needed. |
Thanks for your suggestion. I'm already doing the same. but I rather have library support for such functionality to get all the key -values by calling the function once. I already have to call the get function to retrieve all the keys and then call the get function for every key I retrieved. I think it's not good practice If an app contains lots of key-values. it will make RN bridge busy I guess. |
That's true. One workaround for this is to set the keys at the same in both AsyncStorage and EncryptedStorage, and then fetch the values by looping over the keys and calling For instance:
Not ideal, but works. Especially in those cases where you don't know what the keys are in advance. |
Is there any functionality that returns all stored key values at once? I need to get all key-values to show a list to users
The text was updated successfully, but these errors were encountered: