Skip to content

Commit 25b5f27

Browse files
committed
docs: Updated links in typescript.md v6
1 parent 0c2304a commit 25b5f27

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

versioned_docs/version-6.x/typescript.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ And then we can use it:
5050
</RootStack.Navigator>
5151
```
5252

53-
This will provide type checking and intelliSense for props of the `Navigator` and `Screen` components.
53+
This will provide type checking and intelliSense for props of the [`Navigator`](navigator.md) and [`Screen`](screen.md) components.
5454

5555
:::note
5656

@@ -88,9 +88,9 @@ 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`](navigation-actions#setparams).
91+
This allows us to type check route names and params which you're navigating using [`navigate`](navigation-object.md#navigate), [`push`](stack-actions.md#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

93-
Similarly, you can import `StackScreenProps` for `@react-navigation/stack`, `DrawerScreenProps` from `@react-navigation/drawer`, `BottomTabScreenProps` from `@react-navigation/bottom-tabs` and so on.
93+
Similarly, you can import `StackScreenProps` from [`@react-navigation/stack`](stack-navigator.md), `DrawerScreenProps` from [`@react-navigation/drawer`](drawer-navigator.md), `BottomTabScreenProps` from [`@react-navigation/bottom-tabs`](bottom-tab-navigator.md) and so on.
9494

9595
Then you can use the `Props` type you defined above to annotate your component.
9696

@@ -133,7 +133,7 @@ type ProfileScreenNavigationProp = NativeStackNavigationProp<
133133
>;
134134
```
135135

136-
Similarly, you can import `StackNavigationProp` from `@react-navigation/stack`, `DrawerNavigationProp` from `@react-navigation/drawer`, `BottomTabNavigationProp` from `@react-navigation/bottom-tabs` etc.
136+
Similarly, you can import `StackNavigationProp` from [`@react-navigation/stack`](stack-navigator.md), `DrawerNavigationProp` from [`@react-navigation/drawer`](drawer-navigator.md), `BottomTabNavigationProp` from [`@react-navigation/bottom-tabs`](bottom-tab-navigator.md) etc.
137137

138138
To get the type for the `route` prop, we need to use the `RouteProp` type from `@react-navigation/native`:
139139

@@ -321,7 +321,7 @@ declare global {
321321

322322
The `RootParamList` interface lets React Navigation know about the params accepted by your root navigator. Here we extend the type `RootStackParamList` because that's the type of params for our stack navigator at the root. The name of this type isn't important.
323323

324-
Specifying this type is important if you heavily use `useNavigation`, `Link` etc. in your app since it'll ensure type-safety. It will also make sure that you have correct nesting on the `linking` prop.
324+
Specifying this type is important if you heavily use `useNavigation`, [`Link`](link.md) etc. in your app since it'll ensure type-safety. It will also make sure that you have correct nesting on the [`linking`](navigation-container.md#linking) prop.
325325

326326
### Organizing types
327327

0 commit comments

Comments
 (0)