jasonmerino / react-native-simple-store

A minimalistic wrapper around React Native's AsyncStorage.

Home Page:https://www.npmjs.com/package/react-native-simple-store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

store.update retains original store?

toddmetheny opened this issue · comments

Calling store.update doesn't overwrite all the existing properties does it? If I have 10 properties and call update on a single one...it will just update that one? Even if it is simply an addition (an 11th property?).

Just want to make sure. Running into an issue with store unexpectedly deleting sometimes.

Yeah, that's how it should work. If you have an object with 10 properties and you run update on that with an object with 1 new property the resulting object should have 11 properties.

If you have an example where you can reproduce the oddness that you're seeing I'd be happy to take a look at it.

Closing this issue for now. If this is still an issue for you feel free to comment again with a code example I can take a look at.