Skip to content

Commit 48d3a85

Browse files
committed
docs: added links to typescript.md
1 parent 3cd824e commit 48d3a85

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

versioned_docs/version-6.x/typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type RootStackParamList = {
2828

2929
Specifying `undefined` means that the route doesn't have params. A union type with `undefined` (e.g. `SomeType | undefined`) means that params are optional.
3030

31-
After we have defined the mappings, we need to tell our navigator to use it. To do that, we can pass it as a generic to the `createXNavigator` functions:
31+
After we have defined the mappings, we need to tell our navigator to use it. To do that, we can pass it as a generic to the [`createXNavigator`](static-configuration.md#createxnavigator) functions:
3232

3333
```tsx
3434
import { createStackNavigator } from '@react-navigation/stack';
@@ -88,7 +88,7 @@ If you have an `id` prop for your navigator, you can do:
8888
type Props = NativeStackScreenProps<RootStackParamList, 'Profile', 'MyStack'>;
8989
```
9090

91-
This allows us to type check route names and params which you're navigating using `navigate`, `push` etc. The name of the current route is necessary to type check the params in `route.params` and when you call `setParams`.
91+
This allows us to type check route names and params which you're navigating using `navigate`, `push` etc. The name of the current route is necessary to type check the params in `route.params` and when you call [`setParams`](navigation-actions#setparams).
9292

9393
Similarly, you can import `StackScreenProps` for `@react-navigation/stack`, `DrawerScreenProps` from `@react-navigation/drawer`, `BottomTabScreenProps` from `@react-navigation/bottom-tabs` and so on.
9494

versioned_docs/version-7.x/typescript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ There are 2 steps to configure TypeScript with the static API:
6060
// highlight-end
6161
```
6262

63-
This is needed to type-check the `useNavigation` hook.
63+
This is needed to type-check the [`useNavigation`](use-navigation.md) hook.
6464

6565
## Navigator specific types
6666

@@ -157,7 +157,7 @@ type RootStackParamList = {
157157

158158
Specifying `undefined` means that the route doesn't have params. A union type with `undefined` (e.g. `SomeType | undefined`) means that params are optional.
159159

160-
After we have defined the mapping, we need to tell our navigator to use it. To do that, we can pass it as a generic to the `createXNavigator` functions:
160+
After we have defined the mapping, we need to tell our navigator to use it. To do that, we can pass it as a generic to the [`createXNavigator`](static-configuration.md#createxnavigator)
161161

162162
```tsx
163163
import { createStackNavigator } from '@react-navigation/stack';
@@ -217,7 +217,7 @@ If you have an `id` prop for your navigator, you can do:
217217
type Props = NativeStackScreenProps<RootStackParamList, 'Profile', 'MyStack'>;
218218
```
219219

220-
This allows us to type check route names and params which you're navigating using `navigate`, `push` etc. The name of the current route is necessary to type check the params in `route.params` and when you call `setParams`.
220+
This allows us to type check route names and params which you're navigating using `navigate`, `push` etc. The name of the current route is necessary to type check the params in `route.params` and when you call [`setParams`](navigation-actions#setparams).
221221

222222
Similarly, you can import `StackScreenProps` for `@react-navigation/stack`, `DrawerScreenProps` from `@react-navigation/drawer`, `BottomTabScreenProps` from `@react-navigation/bottom-tabs` and so on.
223223

0 commit comments

Comments
 (0)