react-native-store
react-native-store copied to clipboard
Store doesn't returned saving data efficiently (weird)
300 and 40 stars and not a single tutorial or Example I am impressed with the popularity of react-native-store but unable to implement. Let me write a secnario
var storage = { 'following': Store.model('following'), 'token': Store.model('token') }
storage.following.add({following: responseData}) storage.token.add({token: responseData.token})
storage.following.find().then(resp => console.log(resp)); storage.token.find().then(token => console.log(token));
whenever i try to fetch i am unable to get the required results. sometimes it returned null and sometime it returned only one from the two.
@thewei @hasty @vermilion1 @neoborn ?
Are they saving properly? I am having issues here as well, but my last entry just keeps getting overwritten, rather than adding the next _id and the next entry. Wondering if this might be the same issue?
add
is an asynchronous method as well, can you try to await or chain it before calling your find methods?