File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
versioned_docs/version-7.x Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,19 @@ Note that the returned `options` object will be `undefined` if there are no navi
237237
238238The ` addListener ` method lets you listen to the following events:
239239
240+ ##### ` ready `
241+
242+ The event is triggered when the navigation tree is ready. This is useful for cases where you want to wait until the navigation tree is mounted:
243+
244+ ``` js
245+ const unsubscribe = navigationRef .addListener (' ready' , () => {
246+ // Get the initial state of the navigation tree
247+ console .log (navigationRef .getRootState ());
248+ });
249+ ```
250+
251+ This is analogous to the [ ` onReady ` ] ( #onready ) method.
252+
240253##### ` state `
241254
242255The event is triggered whenever the [ navigation state] ( navigation-state.md ) changes in any navigator in the navigation tree:
You can’t perform that action at this time.
0 commit comments