const getData = async (key) => {
try {
const jsonValue = await AsyncStorage.getItem(key)
return jsonValue != null ? JSON.parse(jsonValue) : null;
} catch(e) {
console.log(e);
}
}
useEffect(() => {
setYoutube(getData('youtube'));
}, []);
Im getting the data for the storage, but when there is no data stored I want to have the value set to FALSE,
I want it like setYoutube(getData('youtube')) when getData('youtube') has no value, I want it to be false