react-native-store icon indicating copy to clipboard operation
react-native-store copied to clipboard

Can't add multiple time

Open quangtruong16994 opened this issue 8 years ago • 1 comments

when I add more than 1 time, like: DB.zamba.add({ id: "account", value: { username: username, password: password, isSaveAccount: true } }); DB.zamba.add({ id: "isSaveAccount", value: { isSave: true } });

It only saves "isSaveAccount". How can I fix this?

quangtruong16994 avatar Dec 23 '16 09:12 quangtruong16994

Is this not because they return a promise and are not executed synchronously so you'd need like:

DB.zamba.add({ id: 'account', value: { username: username, password: password, isSaveAccount: true } }).then(() => DB.zamba.add({ id: 'isSaveAccount', value: {isSave: true} }) );

kymar avatar Apr 10 '17 12:04 kymar