瀏覽代碼

onNavigationCommand

Guy Carmeli 6 年之前
父節點
當前提交
903b9700f6
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. 4
    0
      playground/src/screens/StaticLifecycleOverlay.js

+ 4
- 0
playground/src/screens/StaticLifecycleOverlay.js 查看文件

@@ -20,6 +20,10 @@ class StaticLifecycleOverlay extends Component {
20 20
         events: [...this.state.events, { event: 'componentDidDisappear', componentId, componentName }]
21 21
       });
22 22
     });
23
+    Navigation.events().onNavigationCommand((name, params) => {
24
+      // console.log('RNN', `name: ${JSON.stringify(name)}`);
25
+      // console.log('RNN', `params: ${JSON.stringify(params)}`);
26
+    });
23 27
   }
24 28
 
25 29
   render() {