Skip to content

Commit 6d7c88c

Browse files
committed
Link to the ref guide in navigation container docs
1 parent adf6692 commit 6d7c88c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

versioned_docs/version-6.x/navigating-without-navigation-prop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Navigating without the navigation prop
44
sidebar_label: Navigating without the navigation prop
55
---
66

7-
Sometimes you need to trigger a navigation action from places where you do not have access to the `navigation` prop, such as a Redux middleware. For such cases, you can dispatch navigation actions use a `ref` on the navigation container.
7+
Sometimes you need to trigger a navigation action from places where you do not have access to the `navigation` prop, such as a Redux middleware. For such cases, you can dispatch navigation actions use a [`ref` on the navigation container](navigation-container.md#ref).
88

99
**Do not** use the `ref` if:
1010

versioned_docs/version-6.x/navigation-container.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function App() {
3131

3232
## Ref
3333

34-
It's also possible to attach a [`ref`](https://reactjs.org/docs/refs-and-the-dom.html#creating-refs) to the container to get access to various helper methods, for example, dispatch navigation actions.
34+
It's also possible to attach a [`ref`](https://reactjs.org/docs/refs-and-the-dom.html#creating-refs) to the container to get access to various helper methods, for example, dispatch navigation actions. This should be used in rare cases when you don't have access to the `navigation` prop, such as a Redux middleware.
3535

3636
Example:
3737

@@ -56,6 +56,8 @@ function App() {
5656

5757
If you're using a regular ref object, keep in mind that the ref may be initially `null` in some situations (such as when linking is enabled). To make sure that the ref is initialized, you can use the [`onReady`](#onready) callback to get notified when the navigation container finishes mounting.
5858

59+
See the [Navigating without the navigation prop](navigating-without-navigation-prop.md) guide for more details.
60+
5961
### Methods on the ref
6062

6163
The ref object includes all of the common navigation methods such as `navigate`, `goBack` etc. See [docs for `CommonActions`](navigation-actions.md) for more details.

0 commit comments

Comments
 (0)