Async storage is not saving. error is empty
i try to store deviceId in async storage but function setItem is not working
import AsyncStorage from '@react-native-async-storage/async-storage';
const store = async (uniqueId) => {
const jsonValue = JSON.stringify(uniqueId)
try {
await AsyncStorage.setItem("@user", jsonValue, (e,r)=>{
console.log("error: " ,e)
return r
});
} catch (e) {
console.log("error: ", e)
}
console.log("get Item: " , AsyncStorage.getItem("@user"))
}
store()