I Have Two Tabs in BottomTabNavigator ( React Navigation V5 ) News Screen And Saved Screen . When I Click On Bookmark In One Of The News It Will get Updated To The Async Store And Using this.props.navigation.navigate("saved") I Move To Saved Screen
The Issues Is Once The Screen Is Navigated To Saved I Don't See Any Changes. I Need To Update The Component . With The Value From getMyObject() I need to Call This Below Function and Upadte The Component Each Time The Saved Screen is Focused. Full Code - https://snack.expo.io/@belgin/news-app
getMyObject = async () => {
try {
const jsonValue = await AsyncStorage.getItem('BookMarks');
if (jsonValue) {
const data = JSON.parse(jsonValue);
this.setState({ BookMark_Item : data })
}
} catch (e) {
// read error
}
};
Full Code https://snack.expo.io/@belgin/news-app
Thanks For The Help