-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat: add support set/get object #562
base: main
Are you sure you want to change the base?
Conversation
Hey thanks for your PR! I don't think this is a good thing to add to the library, I would prefer the JSON.stringify/JSON.parse stuff to stay in user code because this is making type assumptions that simply aren't true and aren't typechecked. I'll think about it. |
@mrousavy , actually when use this library, I alway create a common function to save/get object each project. i think it will help someone like me |
I would also love to have an get/set equivalent to the react-native-mmkv/src/hooks.ts Lines 178 to 202 in 40b71fe
Currently when I use the hook and also need some direct getter for an object/array, then I need to write a helper method. Types are not checked by my helper function either, but this is okay. By the way, thank for this package, I migrated all projects from AsyncStorage to MMKV 👍 And I will use it with or without "get/setObject" 😉 |
@mrousavy well, recently I noticed that I don't have to is there anything I'm missing? |
even the object I want to persist is an Object Array, I also don't need to |
sorry about my comments, I'm using |
Yea I know, but this is probably a good thing. If I add |
Add support set/get object, array, ...