📜  在 goBack() 上刷新上一个屏幕 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:48.093000             🧑  作者: Mango

代码示例1
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 ;
}