📜  覆盖 ios 和 android 中的向后滑动行为反应本机 - Javascript 代码示例

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

代码示例1
useEffect(() => {
  const gestureEndListener = () => {
    console.log('iOS back gesture ended');
  };
  // https://reactnavigation.org/docs/3.x/navigation-events
  const gestureHandler = navigation.addListener('didBlur', gestureEndListener);
  return () => {
    gestureHandler.remove();
  };
}, []);