📜  当调用其他屏幕的 goBack 函数时呈现选项卡屏幕 - Javascript 代码示例

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

代码示例1
function Profile({ navigation }) {
  React.useEffect(() => {
    const unsubscribe = navigation.addListener('focus', () => {
      // do something
    });

    return unsubscribe;
  }, [navigation]);

  return ;
}