Преглед на файлове

Update top-level-api.md

Guy Carmeli преди 7 години
родител
ревизия
306fabcf34
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5
    0
      docs/top-level-api.md

+ 5
- 0
docs/top-level-api.md Целия файл

@@ -166,3 +166,8 @@ This is an internal function you probably don't want to use directly. If your sc
166 166
 ```js
167 167
 Navigation.registerScreen('example.AdvancedScreen', () => AdvancedScreen);
168 168
 ```
169
+
170
+## getCurrentlyVisibleScreenId()
171
+In some cases you might need the id of the currently visible screen. This method returns the unique id of the currently visible screen:
172
+`const visibleScreenInstanceId = await Navigation.getCurrentlyVisibleScreenId()`
173
+In order to have any use of this method, you'd need to map instanceId to screens your self.