Answers for "Refresh previous screen on goBack()"

0

Refresh previous screen on goBack()

function Home({ navigation }) {
  React.useEffect(() => {
    const unsubscribe = navigation.addListener('focus', () => {
      loadData();
      //Put your Data loading function here instead of my loadData()
    });

    return unsubscribe;
  }, [navigation]);

  return <HomeContent />;
}
Posted by: Guest on October-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language