My situation involves a storage object structured like this:
import AsyncStorage from "react-native";
const deviceStorage = {
async saveItem(key, value) {
try {
await AsyncStorage.setItem(key, value);
} catch (error) {
console.log('AsyncStorage Error: ' + error.message);
}
}
};
export default deviceStorage;
Encountering an issue where setItem
is throwing an error
Property 'setItem' does not exist on type 'typeof import("/Users/Developer/React/reactRallyApp/node_modules/@types/react-native/index")'
Struggling to identify the cause of this error and how to resolve it, possibly overlooking a simple solution?