Skip to content

Commit ea5bcae

Browse files
committed
Add links to summaries
1 parent 1ac14ce commit ea5bcae

File tree

8 files changed

+29
-30
lines changed

8 files changed

+29
-30
lines changed

versioned_docs/version-7.x/handling-safe-area.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,6 @@ Similarly, you could apply these paddings in `contentContainerStyle` of `FlatLis
473473

474474
## Summary
475475

476-
- Use `useSafeAreaInsets` hook from `react-native-safe-area-context` instead of `SafeAreaView` component
476+
- Use [`useSafeAreaInsets`](https://appandflow.github.io/react-native-safe-area-context/api/use-safe-area-insets) hook from `react-native-safe-area-context` instead of [`SafeAreaView`](https://reactnative.dev/docs/safeareaview) component
477477
- Don't wrap your whole app in `SafeAreaView`, instead apply the styles to content inside your screens
478478
- Apply only specific insets using the `useSafeAreaInsets` hook for more control

versioned_docs/version-7.x/header-buttons.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,6 @@ Generally, this is what you want. But it's possible that in some circumstances t
297297

298298
## Summary
299299

300-
- You can set buttons in the header through the `headerLeft` and `headerRight` properties in `options`.
301-
- The back button is fully customizable with `headerLeft`, but if you just want to change the title or image, there are other `options` for that — `headerBackTitle`, `headerBackTitleStyle`, and `headerBackImageSource`.
302-
- You can use a callback for the options prop to access `navigation` and `route` objects.
300+
- You can set buttons in the header through the [`headerLeft`](elements.md#headerleft) and [`headerRight`](elements.md#headerright) properties in [`options`](screen-options.md).
301+
- The back button is fully customizable with `headerLeft`, but if you only want to change the title or image, there are other `options` for that — [`headerBackTitle`](native-stack-navigator.md#headerbacktitle), [`headerBackTitleStyle`](native-stack-navigator.md#headerbacktitlestyle), and [`headerBackImageSource`](native-stack-navigator.md#headerbackimagesource).
302+
- You can use a callback for the options prop to access [`navigation`](navigation-object.md) and [`route`](route-object.md) objects.

versioned_docs/version-7.x/headers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,6 @@ You can read the full list of available `options` for screens inside of a native
689689

690690
## Summary
691691

692-
- You can customize the header inside of the `options` property of your screens. Read the full list of options [in the API reference](native-stack-navigator.md#options).
693-
- The `options` property can be an object or a function. When it is a function, it is provided with an object with the `navigation` and `route` objects.
694-
- You can also specify shared `screenOptions` in the stack navigator configuration when you initialize it. This will apply to all screens in the navigator.
692+
- You can customize the header inside of the [`options`](screen-options.md) property of your screens. Read the full list of options [in the API reference](native-stack-navigator.md#options).
693+
- The `options` property can be an object or a function. When it is a function, it is provided with an object with the [`navigation`](navigation-object.md) and [`route`](route-object.md) objects.
694+
- You can also specify shared [`screenOptions`](screen-options.md#screenoptions-prop-on-the-navigator) in the stack navigator configuration when you initialize it. This will apply to all screens in the navigator.

versioned_docs/version-7.x/hello-react-navigation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -525,19 +525,19 @@ If you are using TypeScript, you will need to specify the types accordingly. You
525525
<TabItem value="static" label="Static" default>
526526

527527
- React Native doesn't have a built-in API for navigation like a web browser does. React Navigation provides this for you, along with the iOS and Android gestures and animations to transition between screens.
528-
- `createNativeStackNavigator` is a function that takes the screens configuration and renders our content.
528+
- [`createNativeStackNavigator`](native-stack-navigator.md) is a function that takes the screens configuration and renders our content.
529529
- Each property under screens refers to the name of the route, and the value is the component to render for the route.
530-
- To specify what the initial route in a stack is, provide an `initialRouteName` option for the navigator.
531-
- To specify screen-specific options, we can specify an `options` property, and for common options, we can specify `screenOptions`.
530+
- To specify what the initial route in a stack is, provide an [`initialRouteName`](navigator.md#initial-route-name) option for the navigator.
531+
- To specify screen-specific options, we can specify an [`options`](screen-options.md#options-prop-on-screen) property, and for common options, we can specify [`screenOptions`](screen-options.md#screenoptions-prop-on-the-navigator).
532532

533533
</TabItem>
534534
<TabItem value="dynamic" label="Dynamic">
535535

536536
- React Native doesn't have a built-in API for navigation like a web browser does. React Navigation provides this for you, along with the iOS and Android gestures and animations to transition between screens.
537-
- `Stack.Navigator` is a component that takes route configuration as its children with additional props for configuration and renders our content.
538-
- Each `Stack.Screen` component takes a `name` prop which refers to the name of the route and `component` prop which specifies the component to render for the route. These are the 2 required props.
539-
- To specify what the initial route in a stack is, provide an `initialRouteName` as the prop for the navigator.
540-
- To specify screen-specific options, we can pass an `options` prop to `Stack.Screen`, and for common options, we can pass `screenOptions` to `Stack.Navigator`.
537+
- [`Stack.Navigator`](native-stack-navigator.md) is a component that takes route configuration as its children with additional props for configuration and renders our content.
538+
- Each [`Stack.Screen`](screen.md) component takes a [`name`](screen.md#name) prop which refers to the name of the route and [`component`](screen.md#component) prop which specifies the component to render for the route. These are the 2 required props.
539+
- To specify what the initial route in a stack is, provide an [`initialRouteName`](navigator.md#initial-route-name) as the prop for the navigator.
540+
- To specify screen-specific options, we can pass an [`options`](screen-options.md#options-prop-on-screen) prop to `Stack.Screen`, and for common options, we can pass [`screenOptions`](screen-options.md#screenoptions-prop-on-the-navigator) to `Stack.Navigator`.
541541

542542
</TabItem>
543543
</Tabs>

versioned_docs/version-7.x/modal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Instead of specifying this option for a group, it's also possible to specify it
185185

186186
## Summary
187187

188-
- To change the type of transition on a stack navigator you can use the `presentation` option.
188+
- To change the type of transition on a stack navigator you can use the [`presentation`](native-stack-navigator.md#presentation) option.
189189
- When `presentation` is set to `modal`, the screens behave like a modal, i.e. they have a bottom to top transition and may show part of the previous screen in the background.
190190
- Setting `presentation: 'modal'` on a group makes all the screens in the group modals, so to use non-modal transitions on other screens, we add another group with the default configuration.
191191

versioned_docs/version-7.x/navigating.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ export default function App() {
358358

359359
## Summary
360360

361-
- `navigation.navigate('RouteName')` pushes a new route to the native stack navigator if you're not already on that route.
362-
- We can call `navigation.push('RouteName')` as many times as we like and it will continue pushing routes.
363-
- The header bar will automatically show a back button, but you can programmatically go back by calling `navigation.goBack()`. On Android, the hardware back button just works as expected.
364-
- You can go back to an existing screen in the stack with `navigation.popTo('RouteName')`, and you can go back to the first screen in the stack with `navigation.popToTop()`.
365-
- The `navigation` object is available to all screen components with the [`useNavigation`](use-navigation.md) hook.
361+
- [`navigation.navigate('RouteName')`](navigation-object.md#navigate) pushes a new route to the native stack navigator if you're not already on that route.
362+
- We can call [`navigation.push('RouteName')`](stack-actions.md#push) as many times as we like and it will continue pushing routes.
363+
- The header bar will automatically show a back button, but you can programmatically go back by calling [`navigation.goBack()`](navigation-object.md#goback). On Android, the hardware back button just works as expected.
364+
- You can go back to an existing screen in the stack with [`navigation.popTo('RouteName')`](stack-actions.md#popto), and you can go back to the first screen in the stack with [`navigation.popToTop()`](stack-actions.md#poptotop).
365+
- The [`navigation`](navigation-object.md) object is available to all screen components with the [`useNavigation`](use-navigation.md) hook.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,6 @@ If you want to know if the screen is focused or not inside of an event listener,
627627
## Summary
628628

629629
- React Navigation does not unmount screens when navigating away from them
630-
- The `useFocusEffect` hook is analogous to React's `useEffect` but is tied to the navigation lifecycle instead of the component lifecycle.
631-
- The `useIsFocused` hook and `navigation.isFocused` method can be used to determine if a screen is currently focused.
632-
- React Navigation emits `focus` and `blur` events that can be listened to when a screen comes into focus or goes out of focus.
630+
- The [`useFocusEffect`](use-focus-effect.md) hook is analogous to React's [`useEffect`](https://react.dev/reference/react/useEffect) but is tied to the navigation lifecycle instead of the component lifecycle.
631+
- The [`useIsFocused`](use-is-focused.md) hook and [`navigation.isFocused()`](navigation-object.md#isfocused) method can be used to determine if a screen is currently focused.
632+
- React Navigation emits [`focus`](navigation-events.md#focus) and [`blur`](navigation-events.md#blur) events that can be listened to when a screen comes into focus or goes out of focus.

versioned_docs/version-7.x/params.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export default function App() {
373373
374374
See [Nesting navigators](nesting-navigators.md) for more details on nesting.
375375
376-
:::warning
376+
## Reserved param names
377377
378378
Some param names are reserved by React Navigation as part of the API for nested navigators. The list of the reserved param names are as follows:
379379
@@ -384,8 +384,6 @@ Some param names are reserved by React Navigation as part of the API for nested
384384
385385
You should avoid using these param names in your code unless navigating to a screen containing a nested navigator. Otherwise it will result in unexpected behavior, such as the screen not being able to access the params you passed. If you need to pass data to a nested screen, use a different names for the param.
386386
387-
:::
388-
389387
## What should be in params
390388
391389
Params are essentially options for a screen. They should contain the minimal data required to show a screen, nothing more. If the data is used by multiple screens, it should be in a global store or global cache. Params is not designed for state management.
@@ -436,8 +434,9 @@ In essence, pass the least amount of data required to identify a screen in param
436434
437435
## Summary
438436
439-
- `navigate` and `push` accept an optional second argument to let you pass parameters to the route you are navigating to. For example: `navigation.navigate('RouteName', { paramName: 'value' })`.
440-
- You can read the params through `route.params` inside a screen
441-
- You can update the screen's params with `navigation.setParams`
442-
- Initial params can be passed via the `initialParams` prop on `Screen`
437+
- [`navigate`](navigation-actions.md#navigate) and [`push`](stack-actions.md#push) accept an optional second argument to let you pass parameters to the route you are navigating to. For example: `navigation.navigate('RouteName', { paramName: 'value' })`.
438+
- You can read the params through [`route.params`](route-object.md) inside a screen
439+
- You can update the screen's params with [`navigation.setParams`](navigation-object.md#setparams) or [`navigation.replaceParams`](navigation-object.md#replaceparams)
440+
- Initial params can be passed via the [`initialParams`](screen.md#initial-params) prop on `Screen` or in the navigator config
443441
- Params should contain the minimal data required to show a screen, nothing more
442+
- Some [param names are reserved](#reserved-param-names) by React Navigation and should be avoided

0 commit comments

Comments
 (0)