Skip to content

Commit c448534

Browse files
committed
docs: Added more link to TS section
1 parent 25b5f27 commit c448534

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ export default function App() {
166166

167167
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.
168168

169+
Check how to setup `ref` with TypeScript [here](typescript.md#annotating-ref-on-navigationcontainer).
170+
169171
See the [Navigating without the navigation prop](navigating-without-navigation-prop.md) guide for more details.
170172

171173
### Methods on the ref

versioned_docs/version-7.x/screen-options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Each screen can configure various aspects about how it gets presented in the nav
1111

1212
In the [configuring the header bar](headers.md) section of the fundamentals documentation we explain the basics of how this works. Also see the [screen options resolution guide](screen-options-resolution.md) to get an idea of how they work when there are multiple navigators.
1313

14+
See [our docs](typescript.md#annotating-options-and-screenoptions) to learn more about how to use TypeScript with `screenOptions` and `options`.
15+
1416
There are 3 ways of specifying options for screens:
1517

1618
### `options` prop on `Screen`

versioned_docs/version-7.x/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ Specifying this type is important if you heavily use [`useNavigation`](use-navig
469469

470470
When writing types for React Navigation, there are a couple of things we recommend to keep things organized.
471471

472-
1. It's good to create a separate file (e.g. `navigation/types.ts`) that contains the types related to React Navigation.
472+
1. It's good to create a separate file (e.g. `navigation/types.tsx`) that contains the types related to React Navigation.
473473
2. Instead of using `CompositeNavigationProp` directly in your components, it's better to create a helper type that you can reuse.
474474
3. Specifying a global type for your root navigator would avoid manual annotations in many places.
475475

versioned_docs/version-7.x/use-navigation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ export default App;
143143
</TabItem>
144144
</Tabs>
145145

146+
Check how to setup `useNavigation` with TypeScript [here](typescript.md#annotating-usenavigation).
147+
146148
See the documentation for the [`navigation` object](navigation-object.md) for more info.
147149

148150
## Using with class component

versioned_docs/version-7.x/use-route.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ export default App;
142142
</TabItem>
143143
</Tabs>
144144

145+
Check how to setup `useRoute` with TypeScript [here](typescript.md#annotating-useroute).
146+
145147
See the documentation for the [`route` object](route-object.md) for more info.
146148

147149
## Using with class component

0 commit comments

Comments
 (0)