Skip to content

Commit 2ae17a2

Browse files
committed
Tweak headings for hello-react-navigation
1 parent ba9c4d3 commit 2ae17a2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ npm install @react-navigation/native-stack
2020

2121
> 💡 `@react-navigation/native-stack` depends on `react-native-screens` and the other libraries that we installed in [Getting started](getting-started.md). If you haven't installed those yet, head over to that page and follow the installation instructions.
2222
23-
### Creating a native stack navigator
23+
## Creating a native stack navigator
2424

2525
`createNativeStackNavigator` is a function that returns an object containing 2 properties: `Screen` and `Navigator`. Both of them are React components used for configuring the navigator. The `Navigator` should contain `Screen` elements as its children to define the configuration for routes.
2626

@@ -69,7 +69,7 @@ The casing of the route name doesn't matter -- you can use lowercase `home` or c
6969

7070
:::
7171

72-
### Configuring the navigator
72+
## Configuring the navigator
7373

7474
All of the route configuration is specified as props to our navigator. We haven't passed any props to our navigator, so it just uses the default configuration.
7575

@@ -110,7 +110,7 @@ The `component` prop accepts component, not a render function. Don't pass an inl
110110

111111
:::
112112

113-
### Specifying options
113+
## Specifying options
114114

115115
Each screen in the navigator can specify some options for the navigator, such as the title to render in the header. These options can be passed in the `options` prop for each screen component:
116116

@@ -126,7 +126,7 @@ Each screen in the navigator can specify some options for the navigator, such as
126126

127127
Sometimes we will want to specify the same options for all of the screens in the navigator. For that, we can pass a `screenOptions` prop to the navigator.
128128

129-
### Passing additional props
129+
## Passing additional props
130130

131131
Sometimes we might want to pass additional props to a screen. We can do that with 2 approaches:
132132

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ npm install @react-navigation/native-stack@next
2727

2828
:::
2929

30-
### Creating a native stack navigator
30+
## Creating a native stack navigator
3131

3232
<Tabs groupId="config" queryString="config">
3333
<TabItem value="static" label="Static" default>
@@ -120,7 +120,7 @@ The casing of the route name doesn't matter -- you can use lowercase `home` or c
120120

121121
:::
122122

123-
### Configuring the navigator
123+
## Configuring the navigator
124124

125125
All of the route configuration is specified as props to our navigator. We haven't passed any props to our navigator, so it just uses the default configuration.
126126

@@ -232,7 +232,7 @@ When using the dynamic API, the `component` prop accepts a component, not a rend
232232

233233
Here, the `Home` route corresponds to the `HomeScreen` component, and the `Details` route corresponds to the `DetailsScreen` component. The initial route for the stack is the `Home` route. Try changing it to `Details` and reload the app (React Native's Fast Refresh won't update changes from `initialRouteName`, as you might expect), notice that you will now see the `Details` screen. Then change it back to `Home` and reload once more.
234234

235-
### Specifying options
235+
## Specifying options
236236

237237
Each screen in the navigator can specify some options for the navigator, such as the title to render in the header.
238238

@@ -469,7 +469,7 @@ export default function App() {
469469
</TabItem>
470470
</Tabs>
471471

472-
### Passing additional props
472+
## Passing additional props
473473

474474
<Tabs groupId="config" queryString="config">
475475
<TabItem value="static" label="Static" default>

0 commit comments

Comments
 (0)